Skip to main content
Share Your Experience: Take the 2024 Developer Survey
5 votes

Why is OpenGL recompiling my depth map vertex shader based on the GL state?

This is an example of implementation details leaking through the abstraction. Parts of the GL state are often implemented via native GPU ISA instructions that the driver injects into user-defined ...
IneQuation's user avatar
5 votes
Accepted

Bokeh from depth map

The blog post that you talked about, is not about generating bokeh for a computer generated image. It is instead about generating a believable depth of field effect from an image captured by a ...
bram0101's user avatar
  • 1,605
5 votes
Accepted

What happens when GL_Depth is disabled

If depth testing is disabled, the triangles get drawn in the order they're submitted, i.e. the order they appear in the index buffer or vertex buffer. Later ones will overwrite earlier ones, or blend ...
Nathan Reed's user avatar
  • 25.1k
4 votes
Accepted

Why are depth buffer values clamped to (0, 1)?

(Just converting comment into an answer) It seems you might be asking one of two possible questions. If you meant "Why doesn't the Depth buffer contain camera space Z" then it's perhaps worth reading ...
Simon F's user avatar
  • 4,261
3 votes

Creating depth map from a 2-D image?

No, it's not. The way many of the 3D sensors work is by projecting an infrared pattern onto the surface and measuring how it distorts. But with a 2D image, the pattern will simply be projected onto ...
user1118321's user avatar
  • 3,421
2 votes
Accepted

3ds max: Z-fighting when working with Large Objects

Unfortunately, I don't know how 3ds max handles its Z-buffer or its near and far planes so I can't give a definite answer. There are many ways the software could handle this. However, you are on the ...
bernie's user avatar
  • 830
2 votes

Why are depth buffer values clamped to (0, 1)?

Depth buffer values are clamped to that range because usually they are using fixed-point representation, so if clipping is disabled (by glEnable(GL_DEPTH_CLAMP)) ...
Yakov Galka's user avatar
2 votes
Accepted

Questions about Blur effect

If I blur the whole image and apply the result on the sphere, the white background will bleed onto the sphere shape and I want to avoid that. I also don't want that the blue (3) and yellow (4) sphere ...
Tare's user avatar
  • 1,566
2 votes

Why need glClipControl-like extensions when implementing ReverseZ in opgl?

The screenshot you posted states the answer: The value gets mapped into [0, 1] for storage in the depth buffer later, but that doesn't help, since the initial mapping to [-1, 1] has already destroyed ...
Nicol Bolas's user avatar
  • 9,832
2 votes
Accepted

A solution to sprite visibility in a raycasting engine with variable wall heights?

Congratulations for having progressed so far. Context, first analysis Your explanation: I am using a z-buffer, with one stored length to a wall for the x coordinate of each ray. Means the z-buffer ...
Stéphane Gourichon's user avatar
1 vote

3ds max: Z-fighting when working with Large Objects

FYI, the first answer is very close to explaining the causes of Z-fighting, or Z-flashing. It is about decimal places and it does relate to distance, or the simulation of distance. To understand what ...
Rick Keller's user avatar
1 vote

How does UnrealEngine handle depth?

This is just a visualisation. Type the command vis scenedepthz uv0 to see the actual depth buffer used. UE4 uses a "reversed" depth buffer for the scene.
Syntac_'s user avatar
  • 561

Only top scored, non community-wiki answers of a minimum length are eligible