summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred
diff options
context:
space:
mode:
authorCosmic Linden <cosmic@lindenlab.com>2022-10-13 17:10:09 -0700
committerCosmic Linden <cosmic@lindenlab.com>2022-10-13 17:10:09 -0700
commit239dc764e66b3cfeb165a304e64f3f5ad756c3e5 (patch)
tree0fc33cb43777cabae9dd1bb9f2fd7799fbbfc081 /indra/newview/app_settings/shaders/class2/deferred
parent982e2bcbeaa3a56a884ecb168dc655dc6413465c (diff)
SL-18340: Consistently use HAS_SUN_SHADOW for shader permutation
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl4
2 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
index b3f15f81f1..be605b6e60 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
@@ -84,7 +84,7 @@ vec3 atmosFragLightingLinear(vec3 light, vec3 additive, vec3 atten);
void calcAtmosphericVarsLinear(vec3 inPositionEye, vec3 norm, vec3 light_dir, out vec3 sunlit, out vec3 amblit, out vec3 atten, out vec3 additive);
-#ifdef HAS_SHADOW
+#ifdef HAS_SUN_SHADOW
float sampleDirectionalShadow(vec3 pos, vec3 norm, vec2 pos_screen);
#endif
@@ -188,7 +188,7 @@ void main()
float shadow = 1.0f;
-#ifdef HAS_SHADOW
+#ifdef HAS_SUN_SHADOW
shadow = sampleDirectionalShadow(pos.xyz, norm.xyz, frag);
#endif
diff --git a/indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl
index f5c36be897..b39f834e41 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/pbralphaF.glsl
@@ -44,7 +44,7 @@ uniform vec3 moon_dir;
out vec4 frag_color;
-#ifdef HAS_SHADOW
+#ifdef HAS_SUN_SHADOW
VARYING vec3 vary_fragcoord;
uniform vec2 screen_res;
#endif
@@ -186,7 +186,7 @@ void main()
vec3 atten;
calcAtmosphericVarsLinear(pos.xyz, norm, light_dir, sunlit, amblit, additive, atten);
-#ifdef HAS_SHADOW
+#ifdef HAS_SUN_SHADOW
vec2 frag = vary_fragcoord.xy/vary_fragcoord.z*0.5+0.5;
frag *= screen_res;
scol = sampleDirectionalShadow(pos.xyz, norm.xyz, frag);