summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2024-05-03 10:16:14 -0500
committerGitHub <noreply@github.com>2024-05-03 10:16:14 -0500
commit76101843c0d390c25a783f212eb1ea75e508ada4 (patch)
tree0d8a6ae9415e3133ebaae7d666d0d1b7894cd293
parent37972cb76cd0459cd4105bbb09eb8f6cd1aa87f9 (diff)
parent812e2cda54f14a1a6854dd7b9fdd2951932ba2fa (diff)
Merge pull request #1399 from secondlife/release/materials_featurette
#1382 Fix for scrubbing occlusion channel of ORM map (#1383)
-rw-r--r--indra/newview/lltinygltfhelper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/newview/lltinygltfhelper.cpp b/indra/newview/lltinygltfhelper.cpp
index c8a9a36ad1..f71c9dd14a 100644
--- a/indra/newview/lltinygltfhelper.cpp
+++ b/indra/newview/lltinygltfhelper.cpp
@@ -104,9 +104,9 @@ void LLTinyGLTFHelper::initFetchedTextures(tinygltf::Material& material,
}
}
}
- else
+ else if (material.occlusionTexture.index == -1)
{
- // no occlusion, make a white occlusion image
+ // no occlusion, make sure red channel of ORM is all 255
occlusion_img = new LLImageRaw(mr_img->getWidth(), mr_img->getHeight(), 3);
occlusion_img->clear(255, 255, 255);
copy_red_channel(occlusion_img, mr_img);