Skip to main content

Questions tagged [z-buffer]

The tag has no usage guidance.

1 vote
0 answers
190 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 ...
leone ruggiero's user avatar
3 votes
1 answer
575 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 + \...
Jimmy Yang's user avatar
0 votes
1 answer
293 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 ...
Jimmy Yang's user avatar
0 votes
0 answers
66 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 ...
Jimmy Yang's user avatar
-1 votes
1 answer
171 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+...
S. M.'s user avatar
  • 211
1 vote
1 answer
91 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 ...
Simon's user avatar
  • 193
0 votes
0 answers
57 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 ...
user17440's user avatar
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 ...
Paweł Pomierski's user avatar
0 votes
0 answers
123 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 ...
gallickgunner's user avatar
0 votes
1 answer
425 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,...
DirectX_Programmer's user avatar
2 votes
1 answer
365 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 ...
Caspian Ahlberg's user avatar
1 vote
1 answer
330 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: ...
DirectX_Programmer's user avatar
2 votes
2 answers
716 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 ...
Carmo's user avatar
  • 23
1 vote
1 answer
462 views

Problem using Decaling with Stencil to avoid Z-fighting

I need to create a decaling into a surface like a mesh, and to avoid Z-fighting I've been using Stencil Buffer to Turn-off depth test and make the decaling over the surface the Stencil Op permits. In ...
lealericsson's user avatar
3 votes
1 answer
833 views

Layer rendering in Vulkan

I am writing a Vulkan video manipulation engine which has the following layers: Foreground (2D) Scene (3D) Background (2D) Note that each layer may have multiple objects, some of which may be ...
Oier Lauzirika Zarrabeitia's user avatar

15 30 50 per page