JavaScripture
Contribute via GitHub Feedback

WebGLShaderPrecisionFormat : Object

WebGLShaderPrecisionFormat describes the precision of a WebGLShader. WebGLShaderPrecisionFormats are returned from getShaderPrecisionFormat().

Instance Properties

precision : Number  

The number of bits of precision for the specified type. INT types always return 0.

Example:

Run

Results:

 

rangeMax : Number  

The log base 2 of the maximum value that can be represented by the specified type. For example, if rangeMax is 31, the maximum value that can be represented is Math.pow(2, 31).

Example:

Run

Results:

 

rangeMin : Number  

The log base 2 of the absolute value of the minimum (ie, most negative) value that can be represented by the specified type. For example, if rangeMin is 31, the minimum value that can be represented is -Math.pow(2, 31).

Example:

Run

Results: