2

What's the problem with having lower than 10 bit floats? Why don't we have 8 bit floats? I can imagine how it would affect the outcome if glfloat is used for colors, but I can't imagine how it affects vertices. Do problems start to occur when we zoom into objects?

Yes, gpu treats so many values as 32 bit values, and even opengl redbook suggests us to use half floats whenever possible but how can I know my lower limit in precision?

Uğur Gümüşhan
  • 2,455
  • 4
  • 34
  • 62

1 Answers1

4

Why don't we have 8 bit floats? I can imagine how it would affect the outcome if glfloat is used for colors, but I can't imagine how it affects vertices. Do problems start to occur when we zoom into objects?

Well, yes. Given that even low resolution displays these days have at least 1024 pixels in one direction you need at least 10 bits of significant digits to accurately represent a position on the screen. So assuming that the whole transformation chain is performed without loss of precision (which is not the case obviously) this means, that you need at least 11 bits of significant digits in the original data.

In a floating point value, the mantissa is, what gives the significant digits. In a half precision float (16 bits total) the mantissa is 11 bits long, which is the least amount of precision one needs to represent vertices in screen space without transformation operation roundoff artifacts to become visible on a low resolution screen.

8 bits would be just too little precision to be useful for anything.

datenwolf
  • 159,371
  • 13
  • 185
  • 298