From c0cb05010cfa6e9bcbde764ed03384fa8bac1528 Mon Sep 17 00:00:00 2001 From: lfxu Date: Sat, 13 Jan 2024 21:49:37 -0800 Subject: [PATCH] Minor shader fix --- src/shaders/main.glsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shaders/main.glsl b/src/shaders/main.glsl index d2c561c6..09d8146e 100644 --- a/src/shaders/main.glsl +++ b/src/shaders/main.glsl @@ -135,7 +135,7 @@ void vertex() { v_uv_offset = MODEL_MATRIX[3].xz * _mesh_vertex_density; UV -= v_uv_offset; v_uv2_offset = v_uv_offset * _region_texel_size; - UV2 -= v_uv_offset; + UV2 -= v_uv2_offset; } //////////////////////// @@ -258,7 +258,7 @@ float blend_weights(float weight, float detail) { void fragment() { // Recover UVs vec2 uv = UV + v_uv_offset; - vec2 uv2 = UV2 + v_uv_offset; + vec2 uv2 = UV2 + v_uv2_offset; // Calculate Terrain Normals. 4 lookups vec3 w_tangent, w_binormal;