Only sample shadows from the first light source.

This commit is contained in:
Fabian Klemp 2015-01-30 15:11:00 +01:00
parent 823528b75a
commit 45ae4a2c66

View File

@ -111,7 +111,9 @@ void main()
vec3 cameraVector = normalize(camera - vec3(fragPosition));
specularColor += clamp(pow((dot((cameraVector+lightVector),normalize(vNormal))/(length(cameraVector+lightVector)*length(normalize(vNormal)))),shininess), 0.0, 1.0)
*specularFactor*intensity*lightColors[i];
visibility = samplePointShadow(shadowMap_cube, lightDirection);
if (i == 0) {
visibility = samplePointShadow(shadowMap_cube, lightDirection);
}
}
/*float value = texture(shadowMap_cube, lightDirection);
oColor = vec4(value, value, value, 255);*/