Skip to main content

Questions tagged [depth-buffer]

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.

Filter by
Sorted by
Tagged with
1 vote
2 answers
532 views

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.
Prashant Cholachagudda's user avatar
2 votes
1 answer
639 views

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 ...
user1423893's user avatar
2 votes
4 answers
7k views

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-...
bobobobo's user avatar
  • 17.2k
2 votes
1 answer
711 views

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: ...
Grieverheart's user avatar
  • 1,215
4 votes
2 answers
728 views

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 ...
Nock's user avatar
  • 158
10 votes
1 answer
229 views

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 ...
user avatar
4 votes
3 answers
3k views

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 ...
Utkarsh Sinha's user avatar
6 votes
1 answer
7k views

I am trying to read the contents of the depth buffer into main memory so that my CPU side code can do Some Stuff™ with it. I am attempting to do this by creating a staging resource which can be read ...
user avatar
1 vote
1 answer
2k views

For Ogre experienced people, but also experts in the field: Early Z culling is sometimes quite desirable, and that's what I tried to do in Ogre by using a two pass material. The first one is writing ...
teodron's user avatar
  • 3,321
6 votes
1 answer
2k views

How to attach default depth buffer to FBO? How to use depth renderbuffer buffer attached to FBO (after drawing to it) as a default depth buffer? Basically I want to use the same depth buffer for both ...
JBeurer's user avatar
  • 467
1 vote
2 answers
310 views

I've got an application written in D3D9 which will not write any values to the depth buffer, resulting in incorrect values for the depth test. Things I've checked so far: D3DRS_ZENABLE, set to TRUE ...
DeadMG's user avatar
  • 5,536
5 votes
2 answers
1k views

Alright, this is semi-related to my last question here So I've got an really big coordinate system and need to handle rendering large astral bodies from extreme distances. My current approach ...
KlashnikovKid's user avatar
2 votes
3 answers
4k views

I'm stumped. I have been fighting this for about 2 hours now. Here are the interesting parts of my code: ...
John Gietzen's user avatar
1 vote
1 answer
2k views

I'm rendering to a depth map in order to use it as a shader resource view, but when I sample the depth map in my shader, the red component has a value of 1 while all other channels have a value of 0. ...
dotminic's user avatar
  • 1,637
4 votes
1 answer
3k views

I have a software that performs volume rendering through a raycasting approach. The actual raycasting shader writes the raycasted volume depth into a framebuffer object, through gl_FragDepth, that I ...
Dan's user avatar
  • 1,384
4 votes
1 answer
2k views

I'm having trouble understanding the behaviour of my OpenGL program; and in drawing my Z-Buffer out to the screen. It will probably be best to just start with code, here is my GLSL shader: ...
user avatar
4 votes
2 answers
7k views

I am trying to draw spheres using a billboard, so I have a normal map with a z component that I am sampling in my fragment shader. I just need to add this z component to the depth of my fragment to ...
Will's user avatar
  • 7,017
3 votes
1 answer
1k views

I am doing a ray-casting in a 3d texture until I hit a correct value. I am doing the ray-casting in a cube and the cube corners are already in world coordinates so I don't have to multiply the ...
hidayat's user avatar
  • 309
4 votes
1 answer
2k views

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 ...
Etan's user avatar
  • 607
12 votes
2 answers
10k views

Note: I've already found an answer (which I will post after this question) - I was just wondering if I was doing it right, or if there is a better way. I'm making a "2.5D" isometric game using OpenGL ...
Nick Bolton's user avatar
2 votes
2 answers
2k views

I sometimes disable depth buffer writing via glDepthMask(GL_FALSE) during the alpha rendering of a frame. That works perfectly fine on some GPUs (like the Motorola Droid's PowerVR), but on the HTC EVO ...
EboMike's user avatar
  • 217
11 votes
2 answers
16k views

I am doing a GL multi-pass rendering app for iOS. The first pass renders to a depth buffer texture. The second pass uses the values in the depth buffer to control the application of a fragment shader. ...
dugla's user avatar
  • 1,015
10 votes
4 answers
5k views

Shadow mapping uses the depth buffer to calculate where shadows should be drawn. My problem is that I'd like some semi transparent textured quads to cast shadows - for example billboarded trees. As ...
CiscoIPPhone's user avatar
  • 5,278

1 2 3
4
5
8