WebGL WEBGL_debug_shader_precision Extension Rejected Specification




WebGL working group (public_webgl 'at' khronos.org)


Olli Etuaho, NVIDIA

Members of the WebGL working group


Last modified date: January 24, 2015
Revision: 4


WebGL extension #NN


Written against the WebGL API 1.0 specification.


This extension enables software emulation of mediump and lowp floating point arithmetic in GLSL shaders for the purposes of shader testing. The emulation is enabled for shaders that are compiled after the extension has been enabled. Shaders compiled before the extension is enabled are not subject to emulation. The emulation does not model any specific device, but hypothetical shader units that implement IEEE half-precision floating point and the minimum requirements for lowp in The OpenGL ES Shading Language specification version 1.00.17. It is suggested that the software emulation is implemented in shader code, but a large performance cost on the order of one magnitude is still expected on all operations subject to emulation.

Many varieties of PC GPUs only implement one precision for floating point operations that corresponds to highp in The OpenGL ES Shading Language, so errors in shader code which uses mediump or lowp precision may be undetectable on these GPUs. Testing shaders with this extension enabled is recommended to ensure compatibility with a wide variety of hardware. Due to the large performance cost of emulation, this extension should only be used for testing and not in a production environment.

The emulation applies to:

Examples of operations not subject to emulation:

When this extension is enabled:

Due to hardware limitations, it is allowed that some shaders which compile and link successfully when the extension is disabled do not compile or link when the extension is enabled.


[Exposed=(Window,Worker), LegacyNoInterfaceObject]
interface WEBGL_debug_shader_precision {

Revision History

Revision 1, 2014/11/05

Revision 2, 2014/11/10

Revision 3, 2014/11/12

Revision 4, 2015/01/24