summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1
diff options
context:
space:
mode:
authorDave Houlton <euclid@lindenlab.com>2021-11-12 14:49:00 -0700
committerDave Houlton <euclid@lindenlab.com>2021-11-12 14:49:00 -0700
commite914f3e4a11ff86b3e05089c9b3a6677ec623c9c (patch)
treeb1e833e73d5c9c5a54b9e3a2425ed442fcb04a10 /indra/newview/app_settings/shaders/class1
parentaa580c0452584a639a5c9d4921b17d7d454e594e (diff)
Revert "SL-14895, restore previous post-deferred alpha behavior"
This reverts commit ebadc409de90c75f96a005e8f45a3eee4ad243e0.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl14
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/materialF.glsl12
2 files changed, 5 insertions, 21 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index d3a05c34c0..dc484317e9 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -86,14 +86,6 @@ float getAmbientClamp();
vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 diffuse, vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight, float ambiance)
{
- // SL-14895 inverted attenuation work-around
- // This routine is tweaked to match deferred lighting, but previously used an inverted la value. To reconstruct
- // that previous value now that the inversion is corrected, we reverse the calculations in LLPipeline::setupHWLights()
- // to recover the `adjusted_radius` value previously being sent as la.
- float falloff_factor = (12.0 * fa) - 9.0;
- float inverted_la = falloff_factor / la;
- // Yes, it makes me want to cry as well. DJH
-
vec3 col = vec3(0);
//get light vector
@@ -103,7 +95,7 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 diffuse, vec3 v, vec3 n, vec
float dist = length(lv);
float da = 1.0;
- /*if (dist > inverted_la)
+ /*if (dist > la)
{
return col;
}
@@ -121,9 +113,9 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 diffuse, vec3 v, vec3 n, vec
return col;
}*/
- if (dist > 0.0 && inverted_la > 0.0)
+ if (dist > 0.0 && la > 0.0)
{
- dist /= inverted_la;
+ dist /= la;
//normalize light vector
lv = normalize(lv);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
index 02d83925ea..e1f7031af6 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
@@ -91,14 +91,6 @@ float getAmbientClamp();
vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 npos, vec3 diffuse, vec4 spec, vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float fa, float is_pointlight, inout float glare, float ambiance)
{
- // SL-14895 inverted attenuation work-around
- // This routine is tweaked to match deferred lighting, but previously used an inverted la value. To reconstruct
- // that previous value now that the inversion is corrected, we reverse the calculations in LLPipeline::setupHWLights()
- // to recover the `adjusted_radius` value previously being sent as la.
- float falloff_factor = (12.0 * fa) - 9.0;
- float inverted_la = falloff_factor / la;
- // Yes, it makes me want to cry as well. DJH
-
vec3 col = vec3(0);
//get light vector
@@ -108,9 +100,9 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 npos, vec3 diffuse, vec4 spe
float dist = length(lv);
float da = 1.0;
- dist /= inverted_la;
+ dist /= la;
- if (dist > 0.0 && inverted_la > 0.0)
+ if (dist > 0.0 && la > 0.0)
{
//normalize light vector
lv = normalize(lv);