Merge branch 'release/materials_featurette' of https://github.com/secondlife/viewer

meow-7.2.2
Ansariel 2024-03-27 00:04:15 +01:00
commit 9f535a0e2d
2 changed files with 9 additions and 1 deletions

View File

@ -245,6 +245,7 @@ Ansariel Hiller
SL-19623
SL-4126
SL-20224
https://github.com/secondlife/viewer/issues/1051
Aralara Rajal
Arare Chantilly
CHUIBUG-191

View File

@ -76,7 +76,14 @@ void LLFetchedGLTFMaterial::bind(LLViewerTexture* media_tex)
{
// 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 (mBaseColor.mV[3] > 0.f)
{
min_alpha = mAlphaCutoff / mBaseColor.mV[3];
}
else
{
min_alpha = 1024.f;
}
}
shader->uniform1f(LLShaderMgr::MINIMUM_ALPHA, min_alpha);
}