summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/objects
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-05-28 14:36:00 -0700
committerGraham Linden <graham@lindenlab.com>2019-05-28 14:36:00 -0700
commit3d9bd0fb8291ad3de4aaa20100149bd45680538b (patch)
tree48e7e9ea75a8d98d4e79bf49f0c7cf961a9afb76 /indra/newview/app_settings/shaders/class1/objects
parent63ecb7325e77bf3ca568788a4557045054a4520b (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/class1/objects')
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/previewV.glsl6
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl
index 7f3f84398b..88959266c8 100644
--- a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl
@@ -52,7 +52,7 @@ float calcDirectionalLight(vec3 n, vec3 l)
}
-float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float is_pointlight)
+float calcLocalLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float is_pointlight)
{
//get light vector
vec3 lv = lp.xyz-v;
@@ -91,8 +91,8 @@ void main()
// 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*calcLocalLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].z);
+ col.rgb += light_diffuse[3].rgb*calcLocalLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].z);
vertex_color = col*color;
}