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

RE: [Public WebGL] WEBGL_debug_shader_precision extension proposal



Mark,


unfortunately "little slower" in this case may be as much as 10x slower or even a bit more, shader compilation also becomes many times slower and long shaders may run into instruction count limits. Every mediump floating point intermediate value needs to be run through a 6-step function for the emulation. It costs way too much to have it on all the time.


-Olli


From: Mark Callow <khronos@callow.im>
Sent: Friday, November 7, 2014 11:35 AM
To: Olli Etuaho
Cc: Florian Bösch; public_webgl@khronos.org
Subject: Re: [Public WebGL] WEBGL_debug_shader_precision extension proposal
 

On Nov 6, 2014, at 9:58 PM, Olli Etuaho <oetuaho@nvidia.com> wrote:

The extension does not require any support from the GL drivers, so that's why I've submitted the proposal only to the WebGL registry at this point. It can be implemented purely as a transformation of the GLSL code. If there's a strong reason for adding it also as a native extension, I have nothing against that, of course.


If it is just a GLSL transformation the obvious question is why not just require WebGL implementations to do these transformations whenever mediump and lowp are used in a shader? That seems much easier for developers than wrangling debug versions of shaders and an extension. The only downsides I can see are
  • Some apps might break but those apps would already be broken on mobile
  • Some shaders might run a little slower on desktop than they did previously.

Regards

    -Mark