diff --git a/src/graphics/shader.wgsl b/src/graphics/shader.wgsl index 89588cf98..cdd201ad4 100644 --- a/src/graphics/shader.wgsl +++ b/src/graphics/shader.wgsl @@ -35,7 +35,7 @@ let pi: f32 = 3.14159265359; fn frag_model(in: VertexOutput) -> [[location(0)]] vec4 { let light = vec3(0.0, 0.0, -1.0); - let angle = acos(dot(light, -in.normal)); + let angle = acos(abs(dot(light, -in.normal))); let f_angle = angle / (pi / 2.0); let f_normal = max(1.0 - f_angle, 0.0);