From f52fedc77879a5272bea2e0017d0a0d167261da5 Mon Sep 17 00:00:00 2001 From: redstrate <54911369+redstrate@users.noreply.github.com> Date: Fri, 14 Aug 2020 22:31:21 -0400 Subject: [PATCH] Don't clamp NdotV in surface calculations --- shaders/rendering.nocompile.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shaders/rendering.nocompile.glsl b/shaders/rendering.nocompile.glsl index a96ba7d..095f6b6 100755 --- a/shaders/rendering.nocompile.glsl +++ b/shaders/rendering.nocompile.glsl @@ -13,7 +13,7 @@ ComputedSurfaceInfo compute_surface(const vec3 diffuse, const vec3 normal, const info.N = normalize(normal); info.V = normalize(scene.camPos.xyz - in_frag_pos); - info.NdotV = clamp(dot(info.N, info.V), 0.0, 1.0); + info.NdotV = max(dot(info.N, info.V), 0.0); info.metallic = metallic; info.roughness = max(0.0001, roughness * roughness);