Hi,
we are working on an SDF (signed distance functions) based modeller at
www.raysupreme.com. It uses a PBR based path tracer for rendering and requires WebGL v2.
We, as many others I guess, have problems with crashes / long compile times of the rendering shaders. As the map() function inside the shader gets quite big with larger scenes, and this function is inside the path tracer loop, it looks like there is an aggressive loop unrolling going on during shader compilation.
The attached test scene crashes Chrome but works fine In Firefox (although compilation time of the shader is about 15 seconds). I guess FF just "waits longer" for the shader compilation to finish while Chrome throws an exception after a few seconds.
My questions:
* Is there a way, or will there be a way, to disable loop unrolling during shader compilation ? We would happily sacrifice performance for being able to safely run the shader, this is non realtime rendering anyway.
* I read somewhere that with WebGL v2 I can actually find out if the shader has finished compiling or not. Anybody has a link how this is done ? This would enable me to wait until shader compilation is finished before using the shader, which may help with the Chrome issue.
* Also, what is the best way to find out how many milliseconds were needed for a given rendering pass ? I did not find a way yet which works in both Chrome and FF. We adjust the number of scanlines to render based on the average time needed per scanline.
Thanks a lot for any help.
Markus