Modiefied fragment shader 9.1

This commit is contained in:
CybArciom 2023-01-31 16:50:00 +01:00
parent eb31b6db3d
commit 930e8ead01

View File

@ -129,7 +129,9 @@ void main()
vec3 attenuatedlightColor = lightColor/pow(length(lightPos-worldPos),2); //dla pocisku vec3 attenuatedlightColor = lightColor/pow(length(lightPos-worldPos),2); //dla pocisku
vec3 ilumination; vec3 ilumination;
ilumination = ambient+PBRLight(lightDir,attenuatedlightColor,normal,viewDir); ilumination = ambient+PBRLight(lightDir,attenuatedlightColor,normal,viewDir);
// attenuatedlightColor = lightColor/pow(length(lightPos-worldPos),2);
// ilumination=ilumination+PBRLight(lightDir,attenuatedlightColor,normal,viewDir); dla pocisku
//flashlight //flashlight
//vec3 spotlightDir= normalize(spotlightDirTS); //vec3 spotlightDir= normalize(spotlightDirTS);
vec3 spotlightDir= normalize(spotlightPos-worldPos); vec3 spotlightDir= normalize(spotlightPos-worldPos);