diff options
author | Graham Linden <graham@lindenlab.com> | 2019-05-23 11:16:23 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-05-23 11:16:23 -0700 |
commit | 3c37658c02a2cf4b257203a9bc68246c5ac4042a (patch) | |
tree | 567ed3ca41d480fb37762cd3e14dab8ce8d9b419 /indra/newview | |
parent | f51f42f262b816ab800f0f4e821408ec7dbec3fa (diff) |
Re-enable projector ambiance for forward alpha objects.
Undo attenuation hacks and balance with deferred path projector lighting.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl | 5 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/materialF.glsl | 4 |
2 files changed, 2 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl index 4a12659d56..cd0494dc67 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl @@ -91,8 +91,6 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 diffuse, vec3 v, vec3 n, vec //get light vector vec3 lv = lp.xyz-v; -la /= 20.0f; - //get distance float d = length(lv); @@ -109,7 +107,7 @@ la /= 20.0f; float dist = d/la; float dist_atten = clamp(1.0-(dist-1.0*(1.0-fa))/fa, 0.0, 1.0); dist_atten *= dist_atten; - dist_atten *= 2.0f; + //dist_atten *= 2.0f; // spotlight coefficient. float spot = max(dot(-ln, lv), is_pointlight); @@ -120,7 +118,6 @@ la /= 20.0f; float lit = max(da * dist_atten,0.0); -ambiance = 0.0f; float amb_da = ambiance; if (lit > 0) { diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl index 1c0516923e..b599b6d2fc 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl @@ -90,8 +90,6 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 npos, vec3 diffuse, vec4 spe { vec3 col = vec3(0); -la /= 20.0f; - //get light vector vec3 lv = lp.xyz-v; @@ -121,7 +119,7 @@ la /= 20.0f; float dist = d/la; float dist_atten = clamp(1.0-(dist-1.0*(1.0-fa))/fa, 0.0, 1.0); dist_atten *= dist_atten; - dist_atten *= 2.0f; + //dist_atten *= 2.0f; // spotlight coefficient. float spot = max(dot(-ln, lv), is_pointlight); |