diff options
author | Graham Linden <graham@lindenlab.com> | 2019-05-28 14:36:00 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-05-28 14:36:00 -0700 |
commit | 3d9bd0fb8291ad3de4aaa20100149bd45680538b (patch) | |
tree | 48e7e9ea75a8d98d4e79bf49f0c7cf961a9afb76 /indra/newview/app_settings/shaders/class2/lighting | |
parent | 63ecb7325e77bf3ca568788a4557045054a4520b (diff) |
SL-10969, SL-11073
Modify forward projector lighting to use falloff like the deferred lights.
Make tex cache not evaluate evictions for size during validation passes.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/lighting')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl b/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl index 8795d69a3a..30ca88afd2 100644 --- a/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl +++ b/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl @@ -24,7 +24,7 @@ */ float calcDirectionalLight(vec3 n, vec3 l); -float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float is_pointlight); +float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight); vec3 atmosAffectDirectionalLight(float lightIntensity); vec3 scaleDownLight(vec3 light); @@ -40,8 +40,8 @@ vec4 sumLights(vec3 pos, vec3 norm, vec4 color) // Collect normal lights (need to be divided by two, as we later multiply by 2) col.rgb += light_diffuse[1].rgb * calcDirectionalLight(norm, light_position[1].xyz); - col.rgb += light_diffuse[2].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].z); - col.rgb += light_diffuse[3].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].z); + col.rgb += light_diffuse[2].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].y, light_attenuation[2].z); + col.rgb += light_diffuse[3].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].y, light_attenuation[3].z); col.rgb = scaleDownLight(col.rgb); #if defined(LOCAL_LIGHT_KILL) @@ -50,6 +50,7 @@ i#endif // Add windlight lights col.rgb += atmosAffectDirectionalLight(calcDirectionalLight(norm, light_position[0].xyz)); + #if !defined(SUNLIGHT_KILL) col.rgb = min(col.rgb*color.rgb, 1.0); #endif |