Skip to content

A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy injectors to reality checkers. Each agent is a specialized expert with personality, processes, and proven deliverables.

Shell

fix(godot): blend water normal maps in encoded space

Rudy Celeklibe7d8832a420
diff --git a/game-development/godot/godot-shader-developer.md b/game-development/godot/godot-shader-developer.md
index 069a7e2c..7251e1ca 100644
--- a/game-development/godot/godot-shader-developer.md
+++ b/game-development/godot/godot-shader-developer.md
@@ -128,7 +128,8 @@ void fragment() {
vec3 normal_a = texture(normal_map_a, UV * wave_scale + time_offset_a).rgb;
vec3 normal_b = texture(normal_map_b, UV * wave_scale + time_offset_b).rgb;
- NORMAL_MAP = normalize(normal_a + normal_b);
+ // Blend the encoded [0,1] texels; Godot decodes xy * 2 - 1 and rebuilds z
+ NORMAL_MAP = mix(normal_a, normal_b, 0.5);
// Depth-based color blend (Forward+ / Mobile renderer required for DEPTH_TEXTURE)
// In Compatibility renderer: remove depth blend, use flat shallow_color