mirror of
https://github.com/overte-org/overte.git
synced 2025-04-18 20:56:41 +02:00
Only consider model transparent if all texs are
This commit is contained in:
parent
a89a76dc4b
commit
9dcdf26567
1 changed files with 3 additions and 2 deletions
|
@ -135,7 +135,7 @@ bool NetworkGeometry::isLoadedWithTextures() const {
|
|||
}
|
||||
|
||||
if (!_isLoadedWithTextures) {
|
||||
_hasTransparentTextures = false;
|
||||
_hasTransparentTextures = true;
|
||||
|
||||
for (auto&& material : _materials) {
|
||||
if ((material->albedoTexture && !material->albedoTexture->isLoaded()) ||
|
||||
|
@ -152,7 +152,8 @@ bool NetworkGeometry::isLoadedWithTextures() const {
|
|||
const auto& usage = material->albedoTexture->getGPUTexture()->getUsage();
|
||||
bool isTransparentTexture = usage.isAlpha() && !usage.isAlphaMask();
|
||||
material->_material->setTransparentTexture(isTransparentTexture);
|
||||
_hasTransparentTextures = _hasTransparentTextures || isTransparentTexture;
|
||||
// FIXME: Materials with *some* transparent textures seem to give all *other* textures alphas of 0.
|
||||
_hasTransparentTextures = isTransparentTexture && _hasTransparentTextures;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue