WEBGL_debug_shaders
Members of the WebGL working group
Last modified date: May 15, 2013
Revision: 6
WebGL extension #7
Written against the WebGL API 1.0 specification.
WebGL uses the GLSL ES 2.0 spec on all platforms, and translates these shaders to the host platform's native language (HLSL, GLSL, and even GLSL ES). For debugging purpose, it is useful to be able to examine the shader after translation. This extension exposes a new function getTranslatedShaderSource for such purposes.
interface WEBGL_debug_shaders {
DOMString getTranslatedShaderSource(WebGLShader shader);
};
compileShader() has not been called, or the translation has failed for shader, an empty string is returned; otherwise, return the translated source.
Workarounds might be implemented in shader translation for driver bugs, and the pattern of the translation could be used to identify a specific GPU. Therefore, this extension has privacy implications and MUST NOT be available (see getSupportedExtensions()) to regular web content. The extension shall be available only to content determined to be privileged by some user agent specific means.
Revision 1, 2011/10/03
Revision 2, 2011/10/14
Revision 3, 2011/10/18
Revision 4, 2011/12/07
Revision 5, 2012/01/03
Revision 6, 2013/05/15