Tag Info

New answers tagged

1

Yes you can do this. Check out this other question which I asked and then answered myself. Specifically the 2nd half that talks about the depth buffer. Unity3D sprites vs Mesh Quads - Depth, Blending, Shadows The trick is going to be to use a custom shader and set in the shader the render que (to determine draw order) and the depth buffer settings. Your ...


0

Try using a color ramp to represent the final depth values. Instead of writing the z value directly to the pixel, use that value to sample a 1 dimensional texture. This works well because, as you've done, it's easy to get the z value into the range of [0, 1]. Then you can write the retreived color to the pixel. Fragment shader: #version 410 uniform ...



Top 50 recent answers are included