0
votes
1answer
98 views

XNA DepthBias increases performance even when EarlyZ is turned off. Why?

My 3d scene consists of three main polygons: The first and the second polygons overlap each other (have the same World matrix and use the same geometry), the third one is perpendicular to the first ...
1
vote
1answer
96 views

Drawing sprites messes up my model in XNA4

I have a model which draws correctly in XNA4. However if I try to add a background image (or any sprite), the rendering of my model is messed up. There are two problems with the rendering model is ...
-1
votes
1answer
490 views

Why distant objects are being drawn in front of close objects?

I am rendering two cubes in the space using XNA 4.0 and the layering of objects only works from certain angles. Here is what I see from the front angle (everything ok) Here is what I see from ...
1
vote
2answers
317 views

How to render depthmap image in 3d?

I'm new to game development and XNA. I have this depthmap image and I want to render it in 3D, how do I do it, any tutorial or blog post would be helpful.
4
votes
3answers
593 views

When does depth testing happen?

I'm working with 2D sprites - and I want to do 3D style depth testing with them. When writing a pixel shader for them, I get access to the semantic DEPTH0. Would writing to this value help? It seems ...
2
votes
3answers
3k views

Depth Buffer not working in XNA?

I'm stumped. I have been fighting this for about 2 hours now. Here are the interesting parts of my code: protected override void Update(GameTime gameTime) { // Allows the game to exit if ...