[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Public WebGL] Support precompiled shaders as extensions

As there is more and more WebGL content around, shader compilation times start to annoy a lot (just go on shadertoy and see your tab hang for half a minute). Browsers try to cache already compiled shaders, but that's it, it's hardly a solution IMHO. Here's the idea: as we already have platform-dependent extensions for DXT/ETC/PVRTC textures, and they are quite useful indeed, can we do the same for shaders? E.g. if you're on ANGLE, you can have a DX11 shader blob extension. Just feed it the binary, and it works. I don't think there's a security concern with it... you can make browsers compile almost any shader anyway, and they can't mess with unrelated user data.