New WebGL demo - Spring Flowers

97 views
Skip to first unread message

Oleksandr Popov

unread,
Aug 4, 2022, 7:55:37 AM8/4/22
to WebGL Dev List
I've made a new demo - https://keaukraine.github.io/webgl-flowers/index.html
Demo is really tiny - all data + code is 741 kB.
It is made with WebGL 2.0, grass is instanced and split into 16 tiles for fast preliminary culling of batches on CPU.

Will write an article later explaining how it is implemented, for now you can enjoy live demo!

Ken Russell

unread,
Aug 5, 2022, 5:55:25 PM8/5/22
to WebGL Dev List
Very nice! Looking forward to hearing more about how it works!


--
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-lis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/webgl-dev-list/4dc1a1b0-6235-41d0-b09e-3907781f2ce6n%40googlegroups.com.

Sterling Wright

unread,
Aug 8, 2022, 3:21:26 PM8/8/22
to WebGL Dev List
It is beautiful! I wish everything moved a bit more slowly, especially the butterflies, so that I could really have a chance to look at and appreciate them. Well done!

Jonah Ryan-Davis

unread,
Aug 8, 2022, 3:21:32 PM8/8/22
to WebGL Dev List
Great demo! Looking forward to the explanation.

I ended up testing this with a few configurations in Chrome, and ran into some rendering issues. I documented them here: https://bugs.chromium.org/p/chromium/issues/detail?id=1350155
Because there are no errors surfaced, I was wondering if you'd mind helping us out with diagnosing why this doesn't work properly on our Metal backend?
Thanks

On Friday, August 5, 2022 at 5:55:25 PM UTC-4 Kenneth Russell wrote:

Oleksandr Popov

unread,
Aug 8, 2022, 3:39:11 PM8/8/22
to WebGL Dev List
Hello!

Thank you for reporting Chromium bug.
I've noticed rendering issues in Chrome on 2019 Macbook Pro w/ Radeon GPU. But to be honest I saw severe rendering glitches even in Google Maps 3D terrain mode on that machine so I assumed Apple forgot to fix bugs in their GPU drivers and it was a normal behavior ¯\_(ツ)_/¯

I will try to provide more information. Right now I can only tell that if there were any shader compilation errors they will be shown in console.
Looking at screenshots, there might be an issue with FP32 textures, though. Instanced shaders which use vertex fetch from FP32 textures seems to produce no geometry. Instanced shaders which calculate vertex positions dynamically work just fine.
Will try to investigate this more.

Best regards,
   Oleksandr.

Jonah Ryan-Davis

unread,
Aug 8, 2022, 4:10:17 PM8/8/22
to WebGL Dev List
Thanks, that's very helpful feedback!

Oleksandr Popov

unread,
Aug 13, 2022, 7:42:07 AM8/13/22
to WebGL Dev List
I've also got some feedback on Reddit. People experience some issues on Chromebooks and Raspberries.
Reply all
Reply to author
Forward
0 new messages