View Full Version : precision highp int?

06-29-2010, 11:57 AM
Hi ,

I can understand the precision qualifier like "precision mediump float" but what's the point for assigning "precision mediump int"? Are there any differences between "precision highp int" & "precision mediump int"? I mean for an Interger, the floating point precision does not make any sense. Or does the highp or mediump refers to 64bit or 32 bit integer?



07-01-2010, 03:10 AM
Have a look at section 4.5.2 of the GLSL ES spec (http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf).

The minimum ranges that OpenGL ES 2.0 implementations have to support for integers are:
lowp [-255, +255]
mediump [-1023, +1023]
highp [-65535, +65535]

Support for integers is quite limited in GLSL ES, and the ranges are chosen so that mediump and highp ints may be implemented using mediump and highp floats, respectively.