Skip to content

Commit

Permalink
Minor shader fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lfxu authored and lfxu committed Jan 14, 2024
1 parent cce10db commit c0cb050
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shaders/main.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

////////////////////////
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit c0cb050

Please sign in to comment.