mirror of
https://github.com/msitarzewski/agency-agents.git
synced 2026-11-02 08:31:57 +08:00
fix(godot): blend water normal maps in encoded space
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user