0
votes
1answer
287 views

How to update “dynamicVertexBuffer” correctly with “setdata” on XNA?

I developed a small 3d games xna and uses a "DynamicVertexBuffer" and "DynamicIndexBuffer" to store and draw my vertices. Everything works fine, but my problem is the "Update" function where I update ...
2
votes
0answers
211 views

Get Specific depth values in Kinect (XNA)

I'm currently trying to make a hand / finger tracking with a kinect in XNA. For this, I need to be able to specify the depth range I want my program to render. I've looked about, and I cannot see how ...
2
votes
1answer
1k views

Using SpriteBatch with BasicEffects and layerDepth creates negative Z values?

Simply: Why don't all of these sprites draw? What do I need to do to make them draw? I'm trying to use SpriteBatch.Draw with the layerDepth parameter to help reduce overdrawn. However I can't get it ...
3
votes
0answers
525 views

Copying render target texture loses all depth [duplicate]

I have a render target RenderTargetScene that holds my scene texture with the scene's depth buffer rtScene = new RenderTarget2D( graphicsDevice, ...
0
votes
2answers
116 views

Is it possible to read the frame to be output to the screen from GPU in XNA?

I want my XNA game to do its thing and at the end of the Draw() call read the the frame that is sent to the screen into memory (which in XNA would presumably be a Microsoft.Xna.Framework.Color[]). Is ...
1
vote
2answers
313 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.
2
votes
1answer
370 views

My transparent objects overwrite opaque objects depth and always draw on top?

I have set up an 'Order Independent Transparency' method for drawing my transparent objects. The algorithm can be simplified as follows: DrawOpaqueObjects() DrawTransparentObjects() Drawing the ...
4
votes
3answers
578 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 ...
3
votes
1answer
904 views

Drawing a depth map properly

I want to render a depth map by importing it from a file, then creating an array of vertices and indices, and then displaying it using a basic shader (just apply the view and projection matrices on it ...