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.
compileShader()
has not been called, or the translation has failed for shader
, an empty string is returned; otherwise, return the translated source.
1) Should this extension be made available on ordinary web pages?