Questions tagged [z-buffer]
The z-buffer tag has no summary.
25 questions
0
votes
1
answer
94
views
Index buffer on subset of the full vertex buffer
I am trying to implement the ULR paper. To render a new view I create a triangulated grid consisting of: a regular 32x32 grid (equivalent to a coarse pixel grid), the projected proxy and the projected ...
0
votes
0
answers
107
views
how do you extend perspective correct linear intepolation to barycentric coordinates?
perspective correct linear interpolation formula is '1/Z = 1/Z0 + α(1/Z1 - 1/Z0)'
barycentric one is '1/Z = 1/Z0 + α(1/Z1 - 1/Z0) + β(1/Z2 - 1/Z0)'
how can I extend perspective correct linear ...
1
vote
0
answers
256
views
Silhouette edge detection alternatives to Sobel
I'm trying to implement a silhouette detection algorithm in post-processing. I've come across solutions based on Sobel/Roberts cross/... filters and I was wondering if there are more accurate ...
3
votes
1
answer
855
views
Correct way to interpolate 1/z?
I have doubts on 1/z depth buffer interpolation. According to this website, the correct 1/z interpolation formula is
$\dfrac{1}{P.z} = \dfrac{1}{V0.z} * \lambda_0 + \dfrac{1}{V1.z} * \lambda_1 + \...
0
votes
1
answer
414
views
Understanding gluUnProject
I was studying how the OpenGL's gluUnProject works. There is one thing I don't understand: is there any benefit of returning a ray instead of 3D point?
One can use this function to get a ray not a 3D ...
0
votes
0
answers
105
views
Data type for coordinates
I am trying optimize routines for drawing primitive shapes for my custom 3D renderer.
What is the best data type for representing a coordinate in 3D space? I thought that integer would be the best ...
-1
votes
1
answer
221
views
Why we calculate z buffer value from plane equation $AX+BY+CZ+D=0$?
Suppose in perspective projection $(x, y, z)$ coordinate projects to point $(x_p, y_p, z_{vp})$ in projection plane $AX+BY+CZ+D=0$ where projection plane kept at $z_{vp}$ position. And the plane $AX+...
1
vote
1
answer
133
views
OpenGL in CodeBlocks with GNU GCC compiler not recognising some constants
I am writing basic code to; draw triangles, lines etc; to translate and orient them, and to project them in perspective, solving the occlusion problem using the depth buffer.
Having had success with a ...
0
votes
0
answers
90
views
Obtaining sample position z value when using positions from depth buffer for SSAO
I was looking to implement SSAO; demonstrated on learnopeng (https://learnopengl.com/Advanced-Lighting/SSAO). While I have implemented the way they have done it i.e using a position texture for ...
1
vote
2
answers
2k
views
OpenGL transparency - object behind is not rendered
I'm trying to implement voxel world using OpenGL (Core 3.3). I've come across a problem with transparency. It looks like sometimes GPU decides to not render stuff that would be important. Can you help ...
0
votes
0
answers
189
views
Examples of cases where you write depth value in Fragment Shader?
I've very less knowledge when it comes to rasterization and typical rendering in games and other applications. So I was reading up on the rendering pipeline and found that the hardware could do early ...
0
votes
1
answer
613
views
Generate Hi-Z buffer using single PSO and single UAV
I'm currently implementing SSR in my engine and I've created Hi-Z buffer using multiple PSOs in way presented below:
Create descriptor table with multiple UAV entries (this case - 3 entries for Mip 0,...
2
votes
1
answer
540
views
A solution to sprite visibility in a raycasting engine with variable wall heights?
I am writing a raycasting engine. At this point, I have added sprites, and I am using a z-buffer, with one stored length to a wall for the x coordinate of each ray. Below is an image of a sprite which ...
1
vote
1
answer
451
views
Objects in depth buffer are always black (0.0)
My problem is exactly what titles and screenshot below says - rendered object depth value is 0.0 in depth buffer. I'm using DirectX 12.
Matrices:
...
2
votes
2
answers
980
views
What does the z-buffer look like in memory?
I am an amateur game developer, and I've been reading a lot on how computer graphics rendering works lately. I was reading on the Z-buffer recently and I can't quite seem to be able to wrap my head ...