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
2
votes
2
answers
461
views
z ordering in directx11
Hi recently i am trying to implement z ordering system into my directx framework.
So every object will have z order property(int), and this value will have higher priority than depth checking for ...
0
votes
0
answers
124
views
Part of the back side of a transparent object disappears
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 ...
1
vote
1
answer
376
views
Can't get Direct3D11 depth buffer to work
I can't get the depth buffer to work correctly. I am rendering 2 cubes in a single Draw function, and from one angle it looks great
But swing the camera around to view the opposite sides, and I ...
1
vote
1
answer
1k
views
glReadPixels with GL_DEPTH_COMPONENT into PBO is slow
I need to read depth buffer back to cpu memory. It may be few frames old, so I use glReadPixels with a buffer bound to GL_PIXEL_PACK_BUFFER. I use several buffers and ping-pong them. Finally, I read ...
0
votes
1
answer
335
views
XNA 4.0 How to change GraphicsDevice Default DepthStencilState Value
I want to change one of the deafult values of my GraphicsDevice to that:
GraphicsDevice.DepthStencilState.DepthBufferEnable = true;
But I know only to change it ...
0
votes
1
answer
222
views
World position reconstruction from depth fails when viewport size does not match window size
I'm facing very strange issue. My code for world pos reconstruction works correctly when the viewport size is equal to window size (or framebuffer size in other words). Below is the part for ...
0
votes
1
answer
161
views
How can I write an additive mesh shader that splits the RGB channels while accounting for depth?
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 ...
1
vote
3
answers
1k
views
Why do we need a depth buffer to display a single 3D cube?
According to a Vulkan tutorial I am following, I will need to create a depth buffer in order to display a 3D cube:
However, as far as I understand, depth buffers are used for the Z-buffering ...
0
votes
1
answer
333
views
Depth Compositing - Background Not Being Rendered
I have a pre-rendered 3D scene which I am rendering as a background image. Over this, I am rendering an invisible version of this scene only into the depth buffer, so that any other 3D object will be ...
0
votes
1
answer
354
views
How to use depth buffer for z-level rendering in roguelikes?
Developer of the game explains how z-buffer works in Dwarf Fortress (loosely quoted):
"If you clear the buffer every single frame, it kills the game. You have sort of a depth of field. You say I need ...
1
vote
2
answers
919
views
Tiled2Unity depth sorting issue with multiple layers
I have been struggling with an issue for a couple of days now trying to get depth sorting properly when using multiple layers in tiled.
My tiled map is set up as follows:
The sorting Layers I have ...
1
vote
1
answer
46
views
Where do the buffer values come from when rendering?
In the textbook I am reading, it talks about fragment tests that are performed when rendering.
All of these tests involve comparing the current fragment x value (x can be alpha, color, etc.) with a ...
0
votes
3
answers
3k
views
OpenGL ES 2.0 Shadow Mapping - depth only FBO not working due to GL_FRAMEBUFFER_INCOMPLETE_ATTACHMEN
I am trying to add simple shadow mapping to my friends gles 2.0 app. It is based on gles 2.0 and PowerVR SDK.
The problem I encounter is that FBO is not valid due to ...
1
vote
0
answers
326
views
Improving Shadow
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 ...
3
votes
1
answer
2k
views
Difference between linear and logarithmic z-buffer
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 ...