diff options
author | Graham Linden <graham@lindenlab.com> | 2019-04-26 07:59:20 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-04-26 07:59:20 -0700 |
commit | 948deb56d9aa11d61bba76a1e79040e8db0baf49 (patch) | |
tree | 6ce3b4ffeb0e0573499399550901037deada3515 /indra/newview/app_settings/shaders/class1/deferred | |
parent | dbb72176e8086b9a92e301c689e63c16dc704a98 (diff) |
Add projector light within da gtz test.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl | 3 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/materialF.glsl | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl index 300900a9e5..a63b9dec75 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl @@ -117,11 +117,10 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 diffuse, vec3 v, vec3 n, vec // to match spotLight (but not multiSpotLight) *sigh* float lit = max(da * dist_atten,0.0); - col = lit * light_col * diffuse; - float amb_da = ambiance; if (da > 0) { + col = lit * light_col * diffuse; amb_da += (da*0.5+0.5) * ambiance; } amb_da += (da*da*0.5 + 0.5) * ambiance; diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl index 5926236fd7..b3d9b1e9c5 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl @@ -120,11 +120,10 @@ vec3 calcPointLightOrSpotLight(vec3 light_col, vec3 npos, vec3 diffuse, vec4 spe float lit = max(da * dist_atten, 0.0); - col = light_col*lit*diffuse; - float amb_da = ambiance; if (da > 0) { + col = light_col*lit*diffuse; amb_da += (da*0.5 + 0.5) * ambiance; } amb_da += (da*da*0.5+0.5) * ambiance; |