This commit is contained in:
Ray 2026-07-13 19:24:49 +02:00
commit e063385c47
3 changed files with 3 additions and 3 deletions

View file

@ -99,7 +99,7 @@ vec3 ComputePBR()
vec3 N = normalize(fragNormal); vec3 N = normalize(fragNormal);
if (useTexNormal == 1) if (useTexNormal == 1)
{ {
N = texture2D(normalMap, vec2(fragTexCoord.x*tiling.x + offset.y, fragTexCoord.y*tiling.y + offset.y)).rgb; N = texture2D(normalMap, vec2(fragTexCoord.x*tiling.x + offset.x, fragTexCoord.y*tiling.y + offset.y)).rgb;
N = normalize(N*2.0 - 1.0); N = normalize(N*2.0 - 1.0);
N = normalize(N*TBN); N = normalize(N*TBN);
} }

View file

@ -97,7 +97,7 @@ vec3 ComputePBR()
vec3 N = normalize(fragNormal); vec3 N = normalize(fragNormal);
if (useTexNormal == 1) if (useTexNormal == 1)
{ {
N = texture2D(normalMap, vec2(fragTexCoord.x*tiling.x + offset.y, fragTexCoord.y*tiling.y + offset.y)).rgb; N = texture2D(normalMap, vec2(fragTexCoord.x*tiling.x + offset.x, fragTexCoord.y*tiling.y + offset.y)).rgb;
N = normalize(N*2.0 - 1.0); N = normalize(N*2.0 - 1.0);
N = normalize(N*TBN); N = normalize(N*TBN);
} }

View file

@ -100,7 +100,7 @@ vec3 ComputePBR()
vec3 N = normalize(fragNormal); vec3 N = normalize(fragNormal);
if (useTexNormal == 1) if (useTexNormal == 1)
{ {
N = texture(normalMap, vec2(fragTexCoord.x*tiling.x + offset.y, fragTexCoord.y*tiling.y + offset.y)).rgb; N = texture(normalMap, vec2(fragTexCoord.x*tiling.x + offset.x, fragTexCoord.y*tiling.y + offset.y)).rgb;
N = normalize(N*2.0 - 1.0); N = normalize(N*2.0 - 1.0);
N = normalize(N*TBN); N = normalize(N*TBN);
} }