making requested changes

This commit is contained in:
Dante Ruiz 2018-11-08 15:33:18 -08:00
parent 2a16ba57ac
commit 5d000495df

View file

@ -642,10 +642,10 @@ NetworkMaterial::NetworkMaterial(const HFMMaterial& material, const QUrl& textur
map->setUseAlphaChannel(true);
}
}
}
setTextureMap(MapChannel::ALBEDO_MAP, map);
}
}
if (!material.normalTexture.filename.isEmpty()) {
@ -674,9 +674,9 @@ NetworkMaterial::NetworkMaterial(const HFMMaterial& material, const QUrl& textur
auto map = fetchTextureMap(textureBaseUrl, material.occlusionTexture, image::TextureUsage::OCCLUSION_TEXTURE, MapChannel::OCCLUSION_MAP);
if (map) {
map->setTextureTransform(material.occlusionTexture.transform);
}
setTextureMap(MapChannel::OCCLUSION_MAP, map);
}
}
if (!material.emissiveTexture.filename.isEmpty()) {
auto map = fetchTextureMap(textureBaseUrl, material.emissiveTexture, image::TextureUsage::EMISSIVE_TEXTURE, MapChannel::EMISSIVE_MAP);
@ -695,10 +695,10 @@ NetworkMaterial::NetworkMaterial(const HFMMaterial& material, const QUrl& textur
_lightmapParams = material.lightmapParams;
map->setTextureTransform(_lightmapTransform);
map->setLightmapOffsetScale(_lightmapParams.x, _lightmapParams.y);
}
setTextureMap(MapChannel::LIGHTMAP_MAP, map);
}
}
}
void NetworkMaterial::setTextures(const QVariantMap& textureMap) {
_isOriginal = false;
@ -719,9 +719,9 @@ void NetworkMaterial::setTextures(const QVariantMap& textureMap) {
map->setTextureTransform(_albedoTransform);
// when reassigning the albedo texture we also check for the alpha channel used as opacity
map->setUseAlphaChannel(true);
}
setTextureMap(MapChannel::ALBEDO_MAP, map);
}
}
if (!normalName.isEmpty()) {
auto url = textureMap.contains(normalName) ? textureMap[normalName].toUrl() : QUrl();
@ -768,10 +768,10 @@ void NetworkMaterial::setTextures(const QVariantMap& textureMap) {
if (map) {
map->setTextureTransform(_lightmapTransform);
map->setLightmapOffsetScale(_lightmapParams.x, _lightmapParams.y);
}
setTextureMap(MapChannel::LIGHTMAP_MAP, map);
}
}
}
bool NetworkMaterial::isMissingTexture() {
for (auto& networkTexture : _textures) {