How To Create a Water Depth Effect // Godot 4 3D Shader Tutorial @stayathomedev
How To Create a Water Depth Effect // Godot 4 3D Shader Tutorial  @stayathomedev
Uploaded September 2024 | Updated November 2026, 17 hours ago
In this Godot 4 shader tutorial, we're learning how to create a depth effect in our water shader using the DEPTH and SCREEN textures.

-----------------------------------------------------------------------------------

MISSING LINES FOR SAMPLING TEXTURES

// Get Depth and Screen Textures
float depth = textureLod(depth_texture, SCREEN_UV, 0.0).r;
vec3 screen = textureLod(screen_texture, SCREEN_UV, 0.0).rgb;

-----------------------------------------------------------------------------------

🔥 GET THE SOURCE FILES ►► stayathomedev.com/get-the-source-files?utm_campaign=gold_member&utm_medium=description&utm_source=youtube&utm_content=other

👉🏼 CHECK OUT MY GODOT 4 FPS TUTORIAL SERIES ►► youtube.com/playlist?list=PLEHvj4yeNfeF6s-UVs5Zx5TfNYmeCiYwf

👉🏼 CHECK OUT MY GODOT 4 UI TUTORIAL SERIES ►► youtube.com/playlist?list=PLEHvj4yeNfeGiG6ZJXDymk5dYBAjCGiwe

-----------------------------------------------------------------------------------

0:00 - Introduction and Overview
0:17 - Why DEPTH and SCREEN textures
0:43 - Adding New Uniforms and Textures
1:29 - Sampling the Textures and Beer's Law
2:17 - Lerp Color With DEPTH and SCREEN
2:43 - Final Result
3:00 - Get the Source Files

-----------------------------------------------------------------------------------

This series is part of my sponsored Godot shader tutorial videos where we'll create shaders step by step. I won't be skipping any steps in the process and everything will be sequential video to video.

- early access to tutorial videos
- power to vote on what mechanics get covered in future videos
- full access to the project source files to use in your own projects

-----------------------------------------------------------------------------------

STAYATHOMEDEV ►► stayathomedev.com
TWITTER ►► twitter.com/StayAtHomeDev
BLUESKY ►► https://bsky.app/profile/stayathomedev.bsky.social
MY GODOT ASSETS ►► stayathomedev.itch.io

#godot #godotengine #shaders
How To Create a Water Depth Effect // Godot 4 3D Shader Tutorial5 Games Made in Godot To Inspire You (03/22/25)Easy UI Animation in the Godot Engine5 Games Made in Godot To Inspire You5 Games Made in Godot To Inspire You (02/20/26)5 Games Made in Godot To Inspire You (06/10/25)TrenchBroom Custom Entities in Godot | Solid, Point & Model Classes - Godot FPS Series #55 Games Made in Godot To Inspire You (09/16/25)5 Inspiring Games Made in Godot - This Week in Godot (02/15/25)5 Games Made in Godot To Inspire You (10/02/25)Is Solo Indie Game Development Impossible?5 Games Made in Godot To Inspire You
StayAtHomeDev |

How To Create a Water Depth Effect // Godot 4 3D Shader Tutorial

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER