remember to fix normals to [-1, 1]

This commit is contained in:
2026-02-12 16:11:08 +01:00
parent f55fb9165b
commit c87612e2ad
+1 -1
View File
@@ -45,7 +45,7 @@ float dither(vec2 uv) {
void main()
{
// only sample normals for normal mapped geometry
vec3 normal = bool(normalMapped) ? vec3(texture(normalSampler, textureCoordinates)) : normal_in;
vec3 normal = bool(normalMapped) ? 2*vec3(texture(normalSampler, textureCoordinates))-1 : normal_in;
vec3 N = normalize(normal);
vec3 V = normalize(cameraPosition - worldPosition);