Hi
I was just wondering why there aren’t bit operations like bit-shift in OpenGL 2.0 ES Shading Language? Is there some architectural reason?
-hnyk
Bit operations
hnyk
#1
xmas
#2
This restriction allows implementation of the OpenGL ES 2.0 shader pipeline on hardware which is floating point only.
hnyk
#3
Okay, but if it is floating point only, how come there are still variable types like int? Or are they just floating point numbers with lower precision?
xmas
#4
The range requirements for integers are specified so that they can be implemented as floats. Having integers in the language is still useful for type checking and a few other things.