PDA

View Full Version : triangles dissapearing when using tesselation at long distances



liteplane
05-01-2015, 10:38 AM
So, I am trying to make some planet sized sphere . Supposing 0.001 opengl units correspond to a meter, my sphere would have a radius of about 5000. But as I go further away from my sphere, some triangles seem to stop being drawn.
Every time I move (even the camera) different triangles dissapear and reapear, until, at about 15 000, the whole sphere isn't drawn anymore.
I am using glm's infinite perspective but I tried with other perspective matrices without success. Do you have an idea as to why this is happening? Tell me if you need any code.
(Sorry for the small image but i couldn't seem to get a bigger one in my post...)
1772

Aleksandar
05-01-2015, 04:04 PM
That is probably the manifestation of the finite precision. With single precision floating-point arithmetic you cannot rely on more than 6 decimal digits.