From 2ce39f3ad98fe855fb126dc29c82145751434421 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 14 Sep 2022 16:24:20 -0500 Subject: SL-17701 Fix for shadow passes not respecting double sided and alpha parameters for PBR materials. --- indra/newview/llvovolume.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview/llvovolume.cpp') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index b2365653ba..a02c18d99f 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5539,6 +5539,14 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, draw_info->mNormalMap = vobj->getGLTFNormalMap(te); draw_info->mSpecularMap = vobj->getGLTFMetallicRoughnessMap(te); draw_info->mEmissiveMap = vobj->getGLTFEmissiveMap(te); + if (draw_info->mGLTFMaterial->mAlphaMode == LLGLTFMaterial::ALPHA_MODE_MASK) + { + draw_info->mAlphaMaskCutoff = gltf_mat->mAlphaCutoff * gltf_mat->mAlbedoColor.mV[3]; + } + else + { + draw_info->mAlphaMaskCutoff = 1.f; + } } else if (mat) { -- cgit v1.2.3