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.

28 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
2k views

I was having some trouble with cubemaps in OpenGL, and was hoping to get some help. I've been following a tutorial about point light shadow mapping using cubemaps, where a geometry shader is used to ...
kingsapo's user avatar
  • 151
3 votes
0 answers
410 views

I need to avoid z-fighting in exactly co-planar surfaces that are too close to the other solids. I'm re-implementing the Freescape engine in ScummVM (all my code is open-source, available here), and ...
Gustavo Grieco's user avatar
3 votes
0 answers
384 views

I am attempting to add an SSAO post processing shader to my deferred rendering engine. I am running into problems with reading from the depth buffer. In the images linked below you can see the depth ...
AJ Weeks's user avatar
  • 113
3 votes
1 answer
3k views

I've searched about this topic for awhile and i couldn't find it on google. I've come across several ways to avoid z-fighting which are linear z-buffer, logarithmic z-buffer and reversed z-buffer. I ...
Greffin28's user avatar
  • 1,029
2 votes
0 answers
350 views

I can access the same with duplicating the cameras AND the rendertextures, but that seems like a lot of overkill of just getting the depth buffer. I don't need a very precise depth buffer, so it can ...
Dirk Boer's user avatar
  • 149
2 votes
1 answer
264 views

How is it possible that a fragment is generated, passes the depth test but isn't written to the current render target? This is the pixel history I see if I capture a frame in RenderDoc: The fragment ...
leone ruggiero's user avatar
2 votes
0 answers
35 views

The view of my game is always semi topdown. I'm trying to make the contactpoint between characters and the floorplane more grounded without rendering hundreds of sprites. One thing that I think could ...
Dirk Boer's user avatar
  • 149
2 votes
0 answers
710 views

I want to render a scene with an outline post processing effect in OpenGL ES 2.0. First I render all the opaque objects. Then I use a post processing shader for silhouette detection that uses the ...
Gabriel's user avatar
  • 21
2 votes
0 answers
280 views

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 ...
N0xus's user avatar
  • 1,011
1 vote
0 answers
96 views

I have a Unity URP project and in the Scriptable Render Pipeline, I would like to create a RenderTexture and pass the depth and color buffer of the camera object as ...
Fox1942's user avatar
  • 131
1 vote
0 answers
259 views

Which of following approaches will have less performance overhead(using threejs renderer)? I am currently have an issue with z-fight for distant objects, while my near/far plane is already set to most ...
Dmytro Brazhnyk's user avatar
1 vote
0 answers
147 views

I render to texture and attach my own depth buffer that has texture target. However, after I finish rendering I would like to set original depth buffer back. To start rendering to texture I do: ...
Martin Perry's user avatar
  • 1,126
1 vote
0 answers
355 views

I need to improve the shadows in my scene. At a first look they don't look too bad: They look awful when the camera gets closer to them, showing weird artifacts. I would like to know what are the ...
Blue Bug's user avatar
  • 1,112
1 vote
0 answers
838 views

Basically I'm already drawing decals on top of various flat surfaces and that works great. As soon as the decal approaches the edge of a surface, naturally it doesn't get clipped. Is there a way to ...
JBeurer's user avatar
  • 467
1 vote
0 answers
1k views

I lately came around methods optimizing the use of the depth buffer, as the easiest solution reverse depth buffering is mentioned but I cannot wrap my head around why I would be gaining a better depth ...
user5716904's user avatar
1 vote
0 answers
986 views

How would it be possible to create an inverse depth mask? In this case, I refer to a depth mask as a shader attached to a mesh that 'pokes a hole' through the current camera layer to let you see the ...
ilar's user avatar
  • 11
0 votes
0 answers
300 views

I am using OpenGL to render sprites, using an orthographic projection. Each sprite has a position: (x, y, ...
Eilan Laken's user avatar
0 votes
1 answer
154 views

I would like to change the layer depth of objects, so that the player can go behind them. Right now it looks like this when the player is behind the object: The problem is that the layer depth doesn'...
Kuvaitt's user avatar
0 votes
0 answers
104 views

I'm trying to achieve rendering to multiple targets with multiple viewports. Currently it does not work possibly because I have a single depth buffer so a first write to it with a specific viewport ...
philB's user avatar
  • 333
0 votes
0 answers
930 views

Sorry if this question doesn't make sense, I'm still very new to WebGL / OpenGL. Basically, I'm trying to draw a tilemap similar to the one in Stardew Valley. Here's a screenshot from that game: https:...
Ryan Peschel's user avatar
0 votes
0 answers
115 views

I'm working on a prototype where the user can use the mouse to punch holes through a texture, making this texture see-through in that area for a certain amount of time. After that time, the hole will "...
Gardener's user avatar
  • 331
0 votes
0 answers
230 views

I was trying to figure out how perspective projection matrix works, and somehow I ended up in this rabbit hole of depth buffer precision. It seems to be some interest in a depth buffer where the ...
lvella's user avatar
  • 153
0 votes
0 answers
71 views

I need to display a gizmo-like mesh at runtime, and it must be always in front of its target mesh. How can I achieve that?
Szzzzb1's user avatar
0 votes
0 answers
143 views

I have no any experience in game development, I'm doing some research on machine learning tasks and for my project I need to know how to get depth buffer. I tried to google but haven't found relevant ...
Il'ya Zhenin's user avatar
0 votes
0 answers
140 views

I did some blending and culling to get the image below. As you can see, it is messed up. On the right side of the image, only the front side of the mesh shows. On the left side of this image, it works,...
sdfsafasas's user avatar
0 votes
1 answer
199 views

I'm trying to create a sort of "hologram" effect. So far, what I have is an additive, three-pass shader that uses ColorMask for each pass to separate the RGB channels. The problem is that doing so ...
IanLarson's user avatar
  • 811
0 votes
0 answers
334 views

I'm using SlimDX 11 in my managed Direct3D application. I would like to implement deferred shading. I'm having trouble when I try to set a depth stencil surface and multiple render targets at the same ...
P. Avery's user avatar
  • 575
0 votes
1 answer
985 views

I developed a small 3d games xna and uses a "DynamicVertexBuffer" and "DynamicIndexBuffer" to store and draw my vertices. Everything works fine, but my problem is the "Update" function where I update ...
Mehdi Bugnard's user avatar