mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 19:52:26 +02:00
When an albedo texture is replaced from script,make sure its aloha channel is checked for opacity
This commit is contained in:
parent
1e46b0803c
commit
22191a2864
1 changed files with 3 additions and 3 deletions
|
@ -176,9 +176,9 @@ void NetworkGeometry::setTextureWithNameToURL(const QString& name, const QUrl& u
|
||||||
|
|
||||||
auto albedoMap = model::TextureMapPointer(new model::TextureMap());
|
auto albedoMap = model::TextureMapPointer(new model::TextureMap());
|
||||||
albedoMap->setTextureSource(material->albedoTexture->_textureSource);
|
albedoMap->setTextureSource(material->albedoTexture->_textureSource);
|
||||||
albedoMap->setTextureTransform(
|
albedoMap->setTextureTransform(oldTextureMaps[model::MaterialKey::ALBEDO_MAP]->getTextureTransform());
|
||||||
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);
|
networkMaterial->setTextureMap(model::MaterialKey::ALBEDO_MAP, albedoMap);
|
||||||
} else if (material->normalTextureName == name) {
|
} else if (material->normalTextureName == name) {
|
||||||
material->normalTexture = textureCache->getTexture(url);
|
material->normalTexture = textureCache->getTexture(url);
|
||||||
|
|
Loading…
Reference in a new issue