PDA

View Full Version : Anyone know what causes this?


Backov
04-22-2007, 12:50 PM
This is some weird texture problem I am having in XNA. The problem gets worse as the geometry gets farther away/smaller.

http://tamedtornado.com/textureprob.png

Further experiments tell me that this isn't a texture problem. If I reduce the scale of the geometry, then the problem takes quite a bit longer to show up. So this looks to be rounding errors when the numbers get big. Any way to avoid this other than just scaling down?

luggage
04-22-2007, 02:56 PM
Could be a Z-Buffer problem maybe. What are your ranges and scale? Try twiddling with your near and far clip plane and see what happens.

bjgil2
04-22-2007, 06:25 PM
Is this geometry far away from the origin? I've had really big precision errors (i.e. things that should be next to each other are 10s of pixels apart) show up when drawing individual triangles and triangle strips at huge distances from 0,0,0. I learned that you should move your world past the camera rather than moving the camera through a world.

Cheers,
Brett

zppz
04-22-2007, 09:02 PM
Is there any alpha in the texture?
How are you specifying texcoords? Are they automatically generated or specified manually?

Backov
04-22-2007, 11:09 PM
Is this geometry far away from the origin? I've had really big precision errors (i.e. things that should be next to each other are 10s of pixels apart) show up when drawing individual triangles and triangle strips at huge distances from 0,0,0. I learned that you should move your world past the camera rather than moving the camera through a world.

Cheers,
Brett

Ya, that's it actually. It's not that it's very far from the origin, it's just the scales are too large. When I knock the scale down to a saner level it all works fine.