Update loaded models with texture transparency

This commit is contained in:
Zach Pomerantz 2016-02-29 19:26:18 -08:00
parent ee1fb698a4
commit 22d41c833f

View file

@ -145,7 +145,13 @@ bool NetworkGeometry::isLoadedWithTextures() const {
(material->lightmapTexture && !material->lightmapTexture->isLoaded())) {
return false;
}
if (material->albedoTexture) {
// Reset the materialKey transparentTexture key only, as it is albedoTexture-dependent
const auto& usage = material->albedoTexture->getGPUTexture()->getUsage();
material->_material->setTransparentTexture(usage.isAlpha() && !usage.isAlphaMask());
}
}
_isLoadedWithTextures = true;
}
return true;