Tagged Questions
The depth-buffer tag has no wiki summary.
0
votes
1answer
63 views
Why are my scene's depth values not being written to my DepthStencilView?
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.
...
2
votes
1answer
147 views
Renderbuffer to GLSL shader?
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 ...
3
votes
1answer
107 views
The Depth buffer and Perspective
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:
in vec3 ...
3
votes
2answers
213 views
computing gl_FragDepth
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 ...
2
votes
0answers
180 views
Sampling from depth texture causes shader to stop working
I'm currently having issues with depth textures. When I sample from a depth texture it causes my other samplers to fail. For example, when I set gl_FragColor manually the depth buffer is correct. I ...
2
votes
1answer
166 views
Writing the correct value in the depth buffer when using ray-casting
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 ...
3
votes
1answer
255 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 ...
4
votes
2answers
679 views
How do I use depth testing and texture transparency together in my 2.5D world?
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 ...
1
vote
2answers
385 views
Disabling depth write trashes the frame buffer on some GPUs
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 ...
3
votes
2answers
485 views
In OpenGL Can I Discover the Depth Range of a Depth Buffer?
I am doing a GL multi-pass rendering app for iOS. The first pass renders to a depthbuffer texture. The second pass uses the values in the depth buffer to control the application of a fragment shader. ...
6
votes
4answers
538 views
Shadow Mapping and Transparent Quads
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 ...