Improvements to flashlight movement

This commit is contained in:
2023-10-10 16:06:08 -04:00
parent e4aab5c2ea
commit 99d7d3d599
2 changed files with 120 additions and 67 deletions

View File

@@ -32,8 +32,8 @@ void main()
// check if lighting is inside the spotlight cone
float theta = dot(lightDir, normalize(-light.direction));
float co = clamp((theta - light.largecutoff) / (light.smallcutoff - light.largecutoff), 0.0, 1.0);
// diffuse
vec3 norm = normalize(Normal);
float diff = max(dot(norm, lightDir), 0.0);