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

This commit is contained in:
Rudy Celekli
2026-10-18 09:32:07 -04:00
parent 652b2692f8
commit be7d8832a4
@@ -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