Uploaded October 2026 | Updated November 2026, 1 week ago
Godot uses the depth buffer to correctly render objects in the right order, and to optimize rendering by discarding some fragments early. Learn how to change how shaders interact with the depth buffer, create x-ray effects, use the depth texture to make better water effects, and then use the stencil buffer to make non-Euclidean impossible rooms!
------------------------------------------------------------------------
👇 Download the project on GitHub: github.com/daniel-ilett/godot-shader-basics
📰 Read this tutorial in article format instead: danielilett.com/2026-10-22-gdbasics-5-depth-stencils
------------------------------------------------------------------------
✨ Grab Retro Shaders Pro, my PSX and N64 shader asset pack, for Godot here: danielilett.itch.io/retro-shaders-pro-for-godot
🔮 Or get Hologram Shaders Pro for Godot here: danielilett.itch.io/hologram-shaders-pro-for-godot
------------------------------------------------------------------------
💬 Join the Discord: discord.gg/tPQEUwPpb3
☕ Or throw me a one-off coffee on Ko-fi: ko-fi.com/danielilett
------------------------------------------------------------------------
Godot uses the depth buffer to correctly render objects in the right order, and to optimize rendering by discarding some fragments early. Learn how to change how shaders interact with the depth buffer, create x-ray effects, use the depth texture to make better water effects, and then use the stencil buffer to make non-Euclidean impossible rooms!
------------------------------------------------------------------------
👇 Download the project on GitHub: github.com/daniel-ilett/godot-shader-basics
📰 Read this tutorial in article format instead: danielilett.com/2026-10-22-gdbasics-5-depth-stencils
------------------------------------------------------------------------
✨ Grab Retro Shaders Pro, my PSX and N64 shader asset pack, for Godot here: danielilett.itch.io/retro-shaders-pro-for-godot
🔮 Or get Hologram Shaders Pro for Godot here: danielilett.itch.io/hologram-shaders-pro-for-godot
------------------------------------------------------------------------
💬 Join the Discord: discord.gg/tPQEUwPpb3
☕ Or throw me a one-off coffee on Ko-fi: ko-fi.com/danielilett
------------------------------------------------------------------------










