summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-04-26 07:59:20 -0700
committerGraham Linden <graham@lindenlab.com>2019-04-26 07:59:20 -0700
commit948deb56d9aa11d61bba76a1e79040e8db0baf49 (patch)
tree6ce3b4ffeb0e0573499399550901037deada3515
parentdbb72176e8086b9a92e301c689e63c16dc704a98 (diff)
Add projector light within da gtz test.
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/materialF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/waterV.glsl2
6 files changed, 6 insertions, 8 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;
diff --git a/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl b/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl
index a956562396..3b0c81fc71 100644
--- a/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl
@@ -1,5 +1,5 @@
/**
- * @file terrainWaterF.glsl
+ * @file class1\environment\terrainWaterF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
diff --git a/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl b/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl
index 20280ab1c5..8c8bd6d0d5 100644
--- a/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl
@@ -1,5 +1,5 @@
/**
- * @file underWaterF.glsl
+ * @file class1\environment\underWaterF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
index 856924b1e5..df640cba05 100644
--- a/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/waterFogF.glsl
@@ -1,5 +1,5 @@
/**
- * @file waterFogF.glsl
+ * @file class1\environment\waterFogF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterV.glsl b/indra/newview/app_settings/shaders/class1/environment/waterV.glsl
index 1fe98a9575..cc41e3f740 100644
--- a/indra/newview/app_settings/shaders/class1/environment/waterV.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/waterV.glsl
@@ -1,5 +1,5 @@
/**
- * @file waterV.glsl
+ * @file class1\environment\waterV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code