summaryrefslogtreecommitdiff
path: root/indra/newview/llfetchedgltfmaterial.cpp
diff options
context:
space:
mode:
authorCosmic Linden <cosmic@lindenlab.com>2023-04-19 15:56:01 -0700
committercosmic-linden <111533034+cosmic-linden@users.noreply.github.com>2023-04-20 11:23:44 -0700
commit95d07ccd8799808036528f8cd09288d83fc0c7e0 (patch)
tree381e2d9652555815bcc75febe8946c4a7be60409 /indra/newview/llfetchedgltfmaterial.cpp
parentacc6655845d17e05150ceb92e4d145616eefea72 (diff)
SL-19598: Fix shadows not having textures for PBR/non-rigged/alpha blended prims
Diffstat (limited to 'indra/newview/llfetchedgltfmaterial.cpp')
-rw-r--r--indra/newview/llfetchedgltfmaterial.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/llfetchedgltfmaterial.cpp b/indra/newview/llfetchedgltfmaterial.cpp
index 4efe1ad189..1f7d672062 100644
--- a/indra/newview/llfetchedgltfmaterial.cpp
+++ b/indra/newview/llfetchedgltfmaterial.cpp
@@ -70,13 +70,16 @@ void LLFetchedGLTFMaterial::bind(LLViewerTexture* media_tex)
LLViewerTexture* baseColorTex = media_tex ? media_tex : mBaseColorTexture;
LLViewerTexture* emissiveTex = media_tex ? media_tex : mEmissiveTexture;
- if (mAlphaMode == LLGLTFMaterial::ALPHA_MODE_MASK)
+ if (!LLPipeline::sShadowRender || (mAlphaMode == LLGLTFMaterial::ALPHA_MODE_MASK))
{
- // dividing the alpha cutoff by transparency here allows the shader to compare against
- // the alpha value of the texture without needing the transparency value
- min_alpha = mAlphaCutoff/mBaseColor.mV[3];
+ if (mAlphaMode == LLGLTFMaterial::ALPHA_MODE_MASK)
+ {
+ // dividing the alpha cutoff by transparency here allows the shader to compare against
+ // the alpha value of the texture without needing the transparency value
+ min_alpha = mAlphaCutoff/mBaseColor.mV[3];
+ }
+ shader->uniform1f(LLShaderMgr::MINIMUM_ALPHA, min_alpha);
}
- shader->uniform1f(LLShaderMgr::MINIMUM_ALPHA, min_alpha);
if (baseColorTex != nullptr)
{