[Public WebGL] WEBGL_debug_shader_precision extension proposal

Olli Etuaho [email protected]
Mon Nov 10 04:33:05 PST 2014

Thanks for the valuable feedback. It seems reasonable that since this does not add any new features to the language, #extension should not be used. #pragma might still be better than the enable/disable switch. From an implementation perspective, that encapsulates the functionality better inside the shader compiler. For the user, it's easier to understand - there can be no confusion regarding whether the flag should be set when linkProgram is called, for example. It's also more flexible. They can simply add the getExtension() call and then narrow down problems by only editing shaders if they wish, or they can add a parameter to their compileShader() code path that toggles inserting the pragma to shader code.

So I'll submit an amendment adding a #pragma webgl_debug_shader_precision directive, if you have strong objections to this please raise them.

From: Mark Callow <[email protected]>
Sent: Saturday, November 8, 2014 3:40 AM
To: Kenneth Russell
Cc: Florian Bösch; Olli Etuaho; [email protected]
Subject: Re: [Public WebGL] WEBGL_debug_shader_precision extension proposal

> t does seem better if the shaders
> don't have to be modified in order to take advantage of this
> extension.

I agree.

Another point is that #extension is intended for language extensions and this is arguably not a language extension. I think being able to enable and disable this in the API between calls to compileShader is the best approach.



You are currently subscribed to [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:
unsubscribe public_webgl

More information about the public_webgl mailing list