#1382 Fix for scrubbing occlusion channel of ORM map (#1383)

master
RunitaiLinden 2024-05-01 14:37:50 -05:00 committed by GitHub
parent 9b6979f458
commit 812e2cda54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -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);