~ 1 Minute Read.
I recently ported the “Wonderland Engine”, Vhite Rabbit’s inhouse game engine, to web using web assembly and WebGL with Emscripten.
During this process the point light shadows that we created for VR Toyroom back then didn’t quite make it, they required geometry shaders and rendering to a framebuffer with a cube map texture attached to it, which are not supported on WebGL or WebGL2.
The process was simple: the geometry shader would multiply the vertex data for every side of the cube map and use one of six shadow projection matrixes to project it.
Now, though, I need to render the entire scene six times to six different framebuffers with one of the six sides of the cube map attached to each.
This brings GPU rendertime from ~1300 µs up to ~1500 µs, which is “not that bad”, but CPU times take a obvious heavy hit from ~500 µs up to ~2800 µs.
The clue, though: I don’t use any frustum culling yet. Looking forward to how that will improve those numbers. I’m hoping that it will improve it even past the original performance.
Written in 10 minutes, edited in 5 minutes.