diff options
author | Graham Linden <graham@lindenlab.com> | 2019-03-26 10:28:25 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-03-26 10:28:25 -0700 |
commit | fb7c887a5e09024731038eef0a57e5f1e8e08b2e (patch) | |
tree | 9563119c9a44e03c642de828cb93e9399e1c4c35 /indra/newview/app_settings/shaders/class2 | |
parent | 446afe2d1a081a0e10a34749bbe1e4475075dae0 (diff) |
More consistent lighting across ALM/non-ALM/deferred/forward rendering.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl | 13 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl | 12 |
2 files changed, 10 insertions, 15 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl index c4f406aa76..05192e1737 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl @@ -143,11 +143,11 @@ void main() vec3 pos = getPosition(frag.xy).xyz; vec3 lv = center.xyz-pos.xyz; float dist = length(lv); - dist /= size; - if (dist > 1.0) - { - discard; - } + + if ((size > 0) && ((dist / size) > 1.0)) + { + discard; + } float shadow = 1.0; @@ -225,11 +225,8 @@ void main() vec4 amb_plcol = texture2DLodAmbient(projectionMap, proj_tc.xy, proj_lod); amb_da += (da*da*0.5+0.5)*(1.0-shadow)*proj_ambiance; - amb_da *= dist_atten * noise; - amb_da = min(amb_da, 1.0-lit); - col += amb_da*color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a; } diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl index 67eb503e72..4a5f5e642b 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl @@ -143,11 +143,11 @@ void main() vec3 pos = getPosition(frag.xy).xyz; vec3 lv = trans_center.xyz-pos.xyz; float dist = length(lv); - dist /= size; - if (dist > 1.0) - { - discard; - } + + if ((size > 0) && ((dist / size) > 1.0)) + { + discard; + } float shadow = 1.0; @@ -224,9 +224,7 @@ void main() vec4 amb_plcol = texture2DLodAmbient(projectionMap, proj_tc.xy, proj_lod); amb_da += (da*da*0.5+0.5)*(1.0-shadow)*proj_ambiance; - amb_da *= dist_atten * noise; - amb_da = min(amb_da, 1.0-lit); col += amb_da*color.rgb*diff_tex.rgb*amb_plcol.rgb*amb_plcol.a; |