I'm not quite sure how to describe it, so I'll post a screen.
Anyone know why this is happening?
Any help will be very appreciated.
I'm not quite sure how to describe it, so I'll post a screen.
Anyone know why this is happening?
Any help will be very appreciated.
M.Eng Computer Engineering CandidateB.Sc Computer Science
Robotics and graphics enthusiast.
I have the same problem when I place atmospheres over my planets. The Z value between the atmosphere sphere and the planet sphere get smaller and smaller the farther away you get from the planet.
There is a point at which the distance between them is so small that the Z buffer cannot accurately distinguish between the two and so Z fighting occurs. Basically certain pixels pass the Z Buffer test, but because the distance is so small between the two values - there are times when the wrong pixel passes the test.
Solutions:
1. Use a higher precision depth buffer
2. Only render the second sphere when the object is close to the camera
3. Use a Z bias
Also make sure you are normalizing your normals as this sometimes causes that problem.
ok, thanx!
-psychopath
M.Eng Computer Engineering CandidateB.Sc Computer Science
Robotics and graphics enthusiast.