File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -784,7 +784,24 @@ void LLVOVolume::updateTextureVirtualSize(bool forced)
784
784
LLFace* face = mDrawable ->getFace (i);
785
785
if (!face) continue ;
786
786
const LLTextureEntry *te = face->getTextureEntry ();
787
- LLViewerTexture *imagep = face->getTexture ();
787
+ LLViewerTexture *imagep = nullptr ;
788
+ U32 ch_min;
789
+ U32 ch_max;
790
+ if (!te->getGLTFRenderMaterial ())
791
+ {
792
+ ch_min = LLRender::DIFFUSE_MAP;
793
+ ch_max = LLRender::SPECULAR_MAP;
794
+ }
795
+ else
796
+ {
797
+ ch_min = LLRender::BASECOLOR_MAP;
798
+ ch_max = LLRender::EMISSIVE_MAP;
799
+ }
800
+ for (U32 ch = ch_min; (!imagep && ch <= ch_max); ++ch)
801
+ {
802
+ // Get _a_ non-null texture if possible (usually diffuse/basecolor, but could be something else)
803
+ imagep = face->getTexture (ch);
804
+ }
788
805
if (!imagep || !te ||
789
806
face->mExtents [0 ].equals3 (face->mExtents [1 ]))
790
807
{
You can’t perform that action at this time.
0 commit comments