|
|
@ -87,12 +87,7 @@ void main()
|
|
|
|
vec3 diffuseLight, ambientLight;
|
|
|
|
vec3 diffuseLight, ambientLight;
|
|
|
|
doLighting(passViewPos, normalize(viewNormal), shadowing, diffuseLight, ambientLight);
|
|
|
|
doLighting(passViewPos, normalize(viewNormal), shadowing, diffuseLight, ambientLight);
|
|
|
|
lighting = diffuseColor.xyz * diffuseLight + getAmbientColor().xyz * ambientLight + getEmissionColor().xyz;
|
|
|
|
lighting = diffuseColor.xyz * diffuseLight + getAmbientColor().xyz * ambientLight + getEmissionColor().xyz;
|
|
|
|
#endif
|
|
|
|
clampLightingResult(lighting);
|
|
|
|
|
|
|
|
|
|
|
|
#if @clamp
|
|
|
|
|
|
|
|
lighting = clamp(lighting, vec3(0.0), vec3(1.0));
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
lighting = max(lighting, 0.0);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
gl_FragData[0].xyz *= lighting;
|
|
|
|
gl_FragData[0].xyz *= lighting;
|
|
|
|