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.
172
questions
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 ...
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. ...
11
votes
3
answers
3k
views
Using full resolution of depth buffer for 2D rendering
I'm working on a front-to-back renderer for a 2D engine using an orthographic projection. I want to use the depth buffer to avoid overdraw. I have a 16-bit depth buffer, a camera at Z=100 looking at Z=...
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 ...
10
votes
1
answer
5k
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 ...
10
votes
1
answer
204
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 ...
8
votes
1
answer
4k
views
Self occluding object and alpha blending
Look at the object I've rendered with my app:
It's the same screen twice, above the original and below I've drawn (by hand :P) the shape of the mesh of one of plant's leaves. You can clearly see ...
7
votes
1
answer
5k
views
Depth Peeling implementation problem: How to render the next layer? (OpenGL)
I try to implement order-independet transparency sticking to the pseudo code in the linked paper (page 4). I can't figure out how they are able to do this in OpenGL.
I am rendering the scene two ...
6
votes
1
answer
4k
views
using heightmap to simulate 3d in an isometric 2d game
I saw a video of an 2.5d engine that used heightmaps to do zbuffering.
Is this hard to do? I have more or less no idea of Opengl(lwjgl) and that stuff.
I could imagine, that you compare each pixel ...
6
votes
1
answer
1k
views
overlapping 3d particles not blending nicely when at the same z
I'm working on a 3d particle emitter. It's going pretty good but I'm still having a problem with triangle sorting.
As you can see in the photos, there are some particles that are not blending ...
6
votes
1
answer
7k
views
What are the valid DepthBuffer Texture formats in DirectX 11? And which are also valid for a staging resource?
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 ...
6
votes
1
answer
2k
views
Can I use the default depth buffer when drawing to FBO?
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 ...
5
votes
2
answers
1k
views
How to deal with large depth buffer values due to extreme distances
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 ...
5
votes
1
answer
6k
views
unity 5 how to get a shadowmap
I'm writing a custom shader in unity 5 that requires a shadowmap (not just for drawing shadows but also for different computations involving scattering particles through fog). Does anybody know how to ...
5
votes
1
answer
4k
views
How to compute point in view space from depth?
I am trying to implement do some screen space rendering but after looking over the web I still don't find answers to some doubts.
First, I need to compute the point in view space from a value in the ...