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.

4 votes
2 answers
6k 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 ...
Will's user avatar
  • 6,977
3 votes
1 answer
1k 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 ...
hidayat's user avatar
  • 309
4 votes
1 answer
2k 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 ...
Etan's user avatar
  • 607
12 votes
2 answers
10k 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 ...
Nick Bolton's user avatar
2 votes
2 answers
2k 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 ...
EboMike's user avatar
  • 217
11 votes
2 answers
15k views

In OpenGL, how 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 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
  • 985
10 votes
4 answers
5k 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 ...
CiscoIPPhone's user avatar
  • 5,268

15 30 50 per page
1
8 9 10 11
12