I think it is because we are now using sRGB buffers by default in the glTF loader if the texture we load is a color data, meaning ITextureInfo.nonColorData = false
for the texture.
If that is the problem, adding:
BABYLON.SceneLoader.OnPluginActivatedObservable.addOnce(function (loader) {
if (loader.name === "gltf") {
loader.useSRGBBuffers = false;
}
});
should fix it.
A better way to fix it would be to flag your lightmap texture as a non color data texture because it really holds non color data.
So, before calling loadTextureInfoAsync
, set:
commonConstant.lightmapTexture.nonColorData = true;