All Projects → gkjohnson → webgl-precision

gkjohnson / webgl-precision

Licence: MIT License
Webpage for computing and displaying a devices float and int precision for vertex and fragment shaders.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

webgl-precision

Webpage for computing and displaying a devices float, int, and uint precision for vertex and fragment shaders. Includes a test shader for visually determining floating point precision referenced from ARM community articles on floating point precision part 1 and part 2. See the computePrecision function for more information on how the precision and number of bits are computed.

Notes

  • Floating point precision is computed by progressively adding smaller and smaller negative powers of 2 to 1.0 until they have no effect.
  • Uint and Int bits are computed by shifting bits until the number rolls around to 0 or turns negative respectively.
  • On some hardware the precision artifacts seem to be able to optimized out of the computations resulting in a perfect looking test screen that is not representative of the actual floating point precision.
  • Shader precision for floats and ints are set to "highp" for the renderer.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].