From 22191a2864f9f0eaa5ba8a12e47279912cc04a36 Mon Sep 17 00:00:00 2001 From: samcake Date: Wed, 23 Mar 2016 16:12:43 -0700 Subject: [PATCH] When an albedo texture is replaced from script,make sure its aloha channel is checked for opacity --- .../model-networking/src/model-networking/ModelCache.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/model-networking/src/model-networking/ModelCache.cpp b/libraries/model-networking/src/model-networking/ModelCache.cpp index 198cf9143c..b0b769d5e9 100644 --- a/libraries/model-networking/src/model-networking/ModelCache.cpp +++ b/libraries/model-networking/src/model-networking/ModelCache.cpp @@ -176,9 +176,9 @@ void NetworkGeometry::setTextureWithNameToURL(const QString& name, const QUrl& u auto albedoMap = model::TextureMapPointer(new model::TextureMap()); albedoMap->setTextureSource(material->albedoTexture->_textureSource); - albedoMap->setTextureTransform( - oldTextureMaps[model::MaterialKey::ALBEDO_MAP]->getTextureTransform()); - + albedoMap->setTextureTransform(oldTextureMaps[model::MaterialKey::ALBEDO_MAP]->getTextureTransform()); + // when reassigning the albedo texture we also check for the alpha channel used as opacity + albedoMap->setUseAlphaChannel(true); networkMaterial->setTextureMap(model::MaterialKey::ALBEDO_MAP, albedoMap); } else if (material->normalTextureName == name) { material->normalTexture = textureCache->getTexture(url);