|
|
|
|
@ -62,7 +62,8 @@ void main()
|
|
|
|
|
|
|
|
|
|
for (uint i = 0u; i < num_lights; i++) { |
|
|
|
|
vec3 surfaceToLight = lights[i].position - fragPosition; |
|
|
|
|
float brightness = dot(normal, surfaceToLight) / (length(surfaceToLight) * length(normal)); |
|
|
|
|
//float brightness = dot(normal, surfaceToLight) / (length(surfaceToLight) * length(normal));
|
|
|
|
|
float brightness = dot(normal, surfaceToLight) / length(surfaceToLight); |
|
|
|
|
totalBrightness += brightness; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|