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
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










