Merge pull request #3497 from secondlife/rye/forever-3445
Fix media failing to function on PBR materials (#3445)master
commit
c0156eb1c7
|
|
@ -3548,18 +3548,7 @@ void LLViewerMediaTexture::setPlaying(bool playing)
|
|||
for(std::list< LLFace* >::iterator iter = mMediaFaceList.begin(); iter!= mMediaFaceList.end(); ++iter)
|
||||
{
|
||||
LLFace* facep = *iter;
|
||||
const LLTextureEntry* te = facep->getTextureEntry();
|
||||
if (te && te->getGLTFMaterial())
|
||||
{
|
||||
// PBR material, switch emissive and basecolor
|
||||
switchTexture(LLRender::EMISSIVE_MAP, *iter);
|
||||
switchTexture(LLRender::BASECOLOR_MAP, *iter);
|
||||
}
|
||||
else
|
||||
{
|
||||
// blinn-phong material, switch diffuse map only
|
||||
switchTexture(LLRender::DIFFUSE_MAP, *iter);
|
||||
}
|
||||
switchTexture(LLRender::DIFFUSE_MAP, facep);
|
||||
}
|
||||
}
|
||||
else //stop playing this media
|
||||
|
|
|
|||
|
|
@ -5750,7 +5750,12 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
|
|||
if (is_pbr)
|
||||
{
|
||||
// tell texture streaming system to ignore blinn-phong textures
|
||||
facep->setTexture(LLRender::DIFFUSE_MAP, nullptr);
|
||||
// except the special case of the diffuse map containing a
|
||||
// media texture that will be reused for swapping on to the pbr face
|
||||
if (!facep->hasMedia())
|
||||
{
|
||||
facep->setTexture(LLRender::DIFFUSE_MAP, nullptr);
|
||||
}
|
||||
facep->setTexture(LLRender::NORMAL_MAP, nullptr);
|
||||
facep->setTexture(LLRender::SPECULAR_MAP, nullptr);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue