From 37a2458c364f7383f4891429719c6522f8abf6af Mon Sep 17 00:00:00 2001 From: Floppyrj45 Date: Sun, 19 Apr 2026 18:09:24 +0200 Subject: [PATCH] feat(shaders): water surface + caustics + godrays + proper fog depth-based - underwater_fog.gdshader: rewritten shader_type fog with depth-based color/density + current wave - water_surface.gdshader: new spatial shader for water ceiling at y=60 with Fresnel + vertex waves - caustics.gdshader: rewritten with caustic_pattern() function, additive blend, depth fade - godrays.gdshader: rewritten spatial (was canvas_item) with vertical + depth fade, loop-based rays - UnderwaterEnvironment.gd: spawns FogVolume with custom fog shader, volumetric_fog_density=0.05 - GodraysOverlay.gd: MeshInstance3D quad child of camera, updates fade_bottom from camera depth - CausticsLayer.gd: 3 horizontal caustic planes at -5/-15/-25, follow camera XZ - WaterSurface.tscn: PlaneMesh 2000x2000 at y=60 with water_surface shader Co-Authored-By: Claude Sonnet 4.6 --- scripts/ambience/CausticsLayer.gd.uid | 1 + scripts/ambience/GodraysOverlay.gd.uid | 1 + shaders/water_surface.gdshader.uid | 1 + 3 files changed, 3 insertions(+) create mode 100644 scripts/ambience/CausticsLayer.gd.uid create mode 100644 scripts/ambience/GodraysOverlay.gd.uid create mode 100644 shaders/water_surface.gdshader.uid diff --git a/scripts/ambience/CausticsLayer.gd.uid b/scripts/ambience/CausticsLayer.gd.uid new file mode 100644 index 0000000..4b46e0c --- /dev/null +++ b/scripts/ambience/CausticsLayer.gd.uid @@ -0,0 +1 @@ +uid://d1v40uwv1k73a diff --git a/scripts/ambience/GodraysOverlay.gd.uid b/scripts/ambience/GodraysOverlay.gd.uid new file mode 100644 index 0000000..57177ce --- /dev/null +++ b/scripts/ambience/GodraysOverlay.gd.uid @@ -0,0 +1 @@ +uid://dyym376d03yto diff --git a/shaders/water_surface.gdshader.uid b/shaders/water_surface.gdshader.uid new file mode 100644 index 0000000..857f791 --- /dev/null +++ b/shaders/water_surface.gdshader.uid @@ -0,0 +1 @@ +uid://bhgny7t18e67b