From c87612e2ad4fd4726864ad9359cad57b6746cf59 Mon Sep 17 00:00:00 2001 From: Fredrik Robertsen Date: Thu, 12 Feb 2026 16:11:08 +0100 Subject: [PATCH] remember to fix normals to [-1, 1] --- res/shaders/simple.frag | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/shaders/simple.frag b/res/shaders/simple.frag index f40b7fd..68218c5 100644 --- a/res/shaders/simple.frag +++ b/res/shaders/simple.frag @@ -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);