[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] WEBGL_dynamic_texture extension proposal
Recompiling shaders on the fly brings up way too many problems.
*) The shader may fail to compile but you don't get that error until you try to draw.
GL has no such provision for that and programs would have check for errors after draw calls slowing them down tremendously.
*) Shaders can get arbitrarily complex and know why to know how complex until draw time
uniform sampler2D textures; // Is that 16 2D textures or 16 video textures (which is really 48 textures)?
*) The speed of a shader can change drastically from use to use. You'd have to do timing with every combination of inputs.
*) Compiling shaders can be slow, currently an application can deal with that at init time (put up a "loading..." message) etc. but if shaders get arbitrarily recompiled at draw time the app has no way to know if and when there will be a significant pause that they need to guide the user through.
*) Massively complicating WebGL implementations