Depth | Unity Shader Code Basics 04

Опубликовано: 27 Февраль 2026
на канале: Daniel Ilett
2,303
99

Using the depth buffer, Unity can draw objects with the correct per-pixel ordering. We can also access the _CameraDepthTexture, a special texture which contains depth information, to create effects such as silhouettes, or we can change the ZTest to something else like Greater to create an x-ray effect.
------------------------------------------------------------------------
👇 Download the project on GitHub: https://github.com/daniel-ilett/shade...
📰 Read this tutorial in article format instead: https://danielilett.com/2026-01-02-tu...
------------------------------------------------------------------------
✨ Snapshot Shaders 2 has you covered for all your post processing needs: https://assetstore.unity.com/packages...

✨ Grab Retro Shaders Pro, my PSX and N64 shader asset pack, here: https://assetstore.unity.com/packages...

📚 Get a copy of my shader book here: https://link.springer.com/book/10.100...
------------------------------------------------------------------------
💬 Join the Discord:   / discord  
☕ Or throw me a one-off coffee on Ko-fi: https://ko-fi.com/danielilett
------------------------------------------------------------------------