summaryrefslogtreecommitdiff
path: root/indra/newview/llfetchedgltfmaterial.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfetchedgltfmaterial.cpp')
-rw-r--r--indra/newview/llfetchedgltfmaterial.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/llfetchedgltfmaterial.cpp b/indra/newview/llfetchedgltfmaterial.cpp
index 003b373e50..f3583daa0a 100644
--- a/indra/newview/llfetchedgltfmaterial.cpp
+++ b/indra/newview/llfetchedgltfmaterial.cpp
@@ -60,7 +60,9 @@ void LLFetchedGLTFMaterial::bind(LLViewerTexture* media_tex)
if (mAlphaMode == LLGLTFMaterial::ALPHA_MODE_MASK)
{
- min_alpha = mAlphaCutoff;
+ // 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);