[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Support precompiled shaders as extensions
Hey, Kirill Prazdnikov.
Do you have any example that uses a bit more complex shaders with multiple lights and/or cubemaps?
Simple shaders - is easy to compile. Shaders with loops, many functions, will take way way longer.
Have you done measurements and tests on medium mobile platforms, which are still majority of WebGL consumer on mobile?
However if one thinks that this might be a problem,
why not to cache binary shaders in the browsers internal implementations:
String -> Blob ?
However, since the browser runs the driver in its own process (at least in some cases), the browser can emulate the non blocking behavior (in a very suboptimal way). Upon the webgl context asking for COMPLETION_STATUS_ARB, it could query the underlying GL backend for the compile or link status, which will block the GPU process, but the call from JS could proceed to return false right away. I'm not sure it'd be a good idea to emulate it that way.