Verified Commit 6cb23930 authored by insert's avatar insert

Fix.

parent 7b2ed2fa
......@@ -28,10 +28,11 @@ float directional_shadow() {
return shadow;
}
float point_shadow(int shadow) {
vec3 fragToLight = fPos - lightPos;
float point_shadow(int i) {
PointLight light = pointLights[i];
vec3 fragToLight = fPos - light.position;
float closestDepth = texture(pointLights[shadow].shadowMap, fragToLight).r;
float closestDepth = texture(light.shadowMap, fragToLight).r;
closestDepth *= far_plane;
float currentDepth = length(fragToLight);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment