All Questions
Tagged with depth-buffer shaders
28
questions
0
votes
0
answers
58
views
Is it possible to activate/deactivate depth writes in geometry shader?
I'm trying to achieve rendering to multiple targets with multiple viewports. Currently it does not work possibly because I have a single depth buffer so a first write to it with a specific viewport ...
2
votes
0
answers
203
views
Is it possible to extract both the color and the depth texture from one RenderTexture and use it in a Shader?
I can access the same with duplicating the cameras AND the rendertextures, but that seems like a lot of overkill of just getting the depth buffer.
I don't need a very precise depth buffer, so it can ...
0
votes
1
answer
718
views
How to execute early depth test
I have trouble applying early depth test in my engine, to prevent fragment shader to be (fully) executed for fragments that will be overwritten anyway, because other fragments, drawn later, will be in ...
0
votes
2
answers
1k
views
How is depth buffer written to?
As far as I know you normally can't read and write to the same render target in the same shader pass. But if I understand correctly, depth tests rely on depth writes of things being drawn in the same ...
0
votes
1
answer
451
views
Why do I still get values from _CameraDepthTexture even if I didn't set depthTextureMode?
I forgot to write this C# code to enable depth from my camera:
...
1
vote
1
answer
2k
views
How to write depth texture and read values from it
I am new in Unity and specializing in another field. But now I have to rapidly study it for a new project. I will be very thankful if anyone explain me how to read values of the depth buffer.
I wrote ...
0
votes
0
answers
102
views
Punching holes through a texture and making them regenerate back again in an efficient way
I'm working on a prototype where the user can use the mouse to punch holes through a texture, making this texture see-through in that area for a certain amount of time. After that time, the hole will "...
0
votes
0
answers
115
views
How to get depth buffer from PUBG?
I have no any experience in game development, I'm doing some research on machine learning tasks and for my project I need to know how to get depth buffer. I tried to google but haven't found relevant ...
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 ...
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"...
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 ...
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.
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 ...
2
votes
3
answers
449
views
Process of writing to the depth texture
In openGL, let's say I output one single point from the vertex shader with this value
gl_Position = vec4(2.0,3.0,5.0,7.0);
what exact math operations happen to "...