diff options
author | Cosmic Linden <cosmic@lindenlab.com> | 2022-10-13 17:10:09 -0700 |
---|---|---|
committer | Cosmic Linden <cosmic@lindenlab.com> | 2022-10-13 17:10:09 -0700 |
commit | 239dc764e66b3cfeb165a304e64f3f5ad756c3e5 (patch) | |
tree | 0fc33cb43777cabae9dd1bb9f2fd7799fbbfc081 /indra | |
parent | 982e2bcbeaa3a56a884ecb168dc655dc6413465c (diff) |
SL-18340: Consistently use HAS_SUN_SHADOW for shader permutation
Diffstat (limited to 'indra')
4 files changed, 11 insertions, 11 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbralphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbralphaV.glsl index b3880ab178..d0d76fd0cb 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/pbralphaV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/pbralphaV.glsl @@ -46,7 +46,7 @@ uniform mat4 modelview_projection_matrix; uniform mat4 texture_matrix0; -#ifdef HAS_SHADOW +#ifdef HAS_SUN_SHADOW VARYING vec3 vary_fragcoord; uniform float near_clip; #endif @@ -85,7 +85,7 @@ void main() #endif gl_Position = vert; -#ifdef HAS_SHADOW +#ifdef HAS_SUN_SHADOW vary_fragcoord.xyz = vert.xyz + vec3(0,0,near_clip); #endif 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); diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index e7dbdf2bea..3517bbe49a 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -1632,7 +1632,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() if (use_sun_shadow) { - shader->addPermutation("HAS_SHADOW", "1"); + shader->addPermutation("HAS_SUN_SHADOW", "1"); } if (ambient_kill) @@ -1945,7 +1945,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() shader->addPermutation("USE_INDEXED_TEX", "1"); if (use_sun_shadow) { - shader->addPermutation("HAS_SHADOW", "1"); + shader->addPermutation("HAS_SUN_SHADOW", "1"); } if (ambient_kill) @@ -2029,7 +2029,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() if (use_sun_shadow) { - shader->addPermutation("HAS_SHADOW", "1"); + shader->addPermutation("HAS_SUN_SHADOW", "1"); } shader->mRiggedVariant = &gDeferredSkinnedAlphaImpostorProgram; @@ -2095,7 +2095,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() shader[i]->addPermutation("HAS_ALPHA_MASK", "1"); if (use_sun_shadow) { - shader[i]->addPermutation("HAS_SHADOW", "1"); + shader[i]->addPermutation("HAS_SUN_SHADOW", "1"); } if (ambient_kill) @@ -2671,7 +2671,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred() gDeferredAvatarAlphaProgram.addPermutation("IS_AVATAR_SKIN", "1"); if (use_sun_shadow) { - gDeferredAvatarAlphaProgram.addPermutation("HAS_SHADOW", "1"); + gDeferredAvatarAlphaProgram.addPermutation("HAS_SUN_SHADOW", "1"); } if (ambient_kill) |