Depth buffer stores a depth (z-coordinate) of a rendered pixel of a 3D scene. Depth buffer is used in Z-buffering (management of image depth coordinates). Because of this depth buffer is often called Z-buffer.
2
votes
0answers
123 views
Annoying flickering of vertices and edges (possible z-fighting)
I'm trying to make a software z-buffer implementation (meaning no DirectX or OpenGL, only a 2D library, SDL to be precise), however, after I generate the z-buffer and proceed with the vertex culling, ...
0
votes
1answer
87 views
Why distant objects draw 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 ...
3
votes
2answers
194 views
Scan-Line Z-Buffering Dilemma
I have a set of vertices in 3D space, and for each I retain the following information:
Its 3D coordinates (x, y, z).
A list of pointers to some of the other vertices with which it's connected by ...
7
votes
1answer
242 views
Depth interpolation for z-buffer, with scanline
I have to write my own software 3d rasterizer, and so far I am able to project my 3d model made of triangles into 2d space:
I rotate, translate and project my points to get a 2d space representation ...
2
votes
0answers
83 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
0answers
274 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
241 views
Copying render target texture loses all depth
I have a render target RenderTargetScene that holds my scene texture with the scene's depth buffer
rtScene = new RenderTarget2D(
graphicsDevice,
...
0
votes
2answers
93 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 ...
0
votes
2answers
143 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
192 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 ...
0
votes
3answers
189 views
What is the format of DXGI_FORMAT_D24_UNORM_S8_UINT?
I'm trying to read the values in a depth texture of type DXGI_FORMAT_D24_UNORM_S8_UINT.
I know this means "24 bits for depth, 8 bits for stencil" "A 32-bit z-buffer format that supports 24 bits for ...
2
votes
1answer
228 views
Position Reconstruction from Depth by inverting Perspective Projection
I had some trouble reconstructing position from depth sampled from the depth buffer. I use the equivalent of gluPerspective in GLM. The code in GLM is:
template
GLM_FUNC_QUALIFIER detail::tmat4x4 ...
3
votes
2answers
97 views
How can I simulate multiple depth channels?
Here's what I'd like to achieve:
Rendering a first pass of objects in my scene, using standard depth comparison
Rendering another pass of objects in the same scene, but with the following rules:
A ...
5
votes
0answers
102 views
What would be a good filter to create 'magnetic deformers' from a depth map?
In my project, I am creating a system for deforming a highly detailed mesh (clothing) so that it 'fits' a convex mesh.
To do this I use depth maps of the item and the 'hull' to determine at what point ...
4
votes
3answers
239 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 ...