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
1
answer
2k
views
Drawing a grid over a terrain using a mesh - Shader Depth and Z-Buffer
What I'm trying to achieve is rendering a (huge) tile grid over a terrain. For that I'm using a generated mesh of quads, one for every tile, whose vertices Y value is the same of the terrain to "shape"...
1
vote
1
answer
867
views
How do I write to a 16-bit depth buffer using Monogame and HLSL?
I'm working on shadow mapping. Part of the implementation involves drawing 3D models to a depth buffer with recommended 16-bit depth. To that end, I'm first creating a render target as follows:
...
4
votes
3
answers
4k
views
Ray tracing and Z buffering in graphics
I am a high school student taking computer science as a subject, and someone who is very interested in the game development industry. I am currently writing an essay on Raytracing and Z-buffering by ...
3
votes
0
answers
363
views
Reading depth buffer result in only two values
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 ...
0
votes
1
answer
3k
views
Unity Custom Sprite Shader: Don't write transparent pixels into Depth Buffer
For performance reasons, i have to create my own billboards to replace some geometry. I modified the standard sprite shader to Cull Back and ...
0
votes
1
answer
1k
views
Left-handed version of the reversed depth projection with infinite far plane
Let's say that I have standard left-handed WorldToView and ViewToScreen row-major matrices in the same vein as the DirectX ...
0
votes
1
answer
1k
views
Direct3D11 Depth buffer problem
Encountered a strange error when using Direct3D11, feature level 10.0.
If the depth buffer texture is created with the format DXGI_FORMAT_R24G8_TYPELESS, bind flag D3D11_BIND_DEPTH_STENCIL | ...
2
votes
1
answer
5k
views
Simple cartoon water shader shoreline
I'm currently attempting to create a cartoon-ish water shader with a shoreline. After looking around trying to find out how other games do it i figured out it has something to do with getting the ...
0
votes
2
answers
2k
views
How to determine how far the background is behind a transparent object in a shader?
Is there a way to know how far away any object is behind a transparent object in a shader? Like making water fully transparent when close to shore.
4
votes
2
answers
4k
views
color individual triangles on a mesh in Unity?
I am trying to use Unity to display a model and color some triangles on the model to high light those parts of the model.
I have created a scene, with a camera, a light source and a cube.
After the ...
0
votes
1
answer
381
views
Depth test -opengl
Does depth test runs before fragment shader,hence not even processing the fragment with frag shader if fragment is discarded
Or
It first runs the fragment shader and then depth test I.e. fragment ...
1
vote
0
answers
675
views
How to do Decal Clipping with OpenGL using Depth Buffer comparison?
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 ...
1
vote
1
answer
732
views
What is the math behind rendering isometric with the aid of Depth Maps?
I am currently in the process of designing an Isometric game, and one of the features we are trying to add, is using sprite depth maps to render geometry in the correct order.
The reason we are ...
0
votes
2
answers
337
views
DX11 Clear Issue, Irregular pattern
So far I've put together a bare minimum of a DirectX 11 application. All it does is clear the window to a random shade of red.
...
0
votes
1
answer
608
views
Z buffer for large vs small objects
Are there common, tried and tested techniques for making sure that when displaying very large and very small objects, in a 3D environment, those objects don't display in front or behind each other?
...