Any recent changes to materials and gammaSpace?

Hi everyone,

Quick question: does anybody remember whether there have been any changes to materials.albedoColor (/diffuseColor) that are in gamma space now and were not before? Maybe in the glb loader? Or maybe in the Blender glb exporter?

I am asking because I am chasing a bug where suddenly the colors of meshes are completely off. I can fix it by commenting the albedoColor.toGammaSpace(true) conversion. I have no idea where this is suddenly comming from. :face_with_spiral_eyes:

Best wishes
Joe


Probably not: same output in Babylon6 and latest https://playground.babylonjs.com/#88CB6A#162

Not that I am aware of :frowning:

It could be the fact that we now use sRGB textures by default when loading glTF files, after a bug has been fixed in Chrome. However, it’s now a few weeks/months since we did the change…

[…] It is this change:

You can test if it’s your problem by passing forceSRGBBufferSupportState: false through the options of the engine constructor.

2 Likes

Oh wow, thanks @Evgeni_Popov. This saved my hours of debugging :hugs:


I wonder should this be marked as a breaking change?

1 Like

I updated the comment of the PR to indicate it could be a breaking change, and how to fix it.

2 Likes

I was not looking that far, I was thinking about the last couple days :slight_smile: sorry @Joe_Kerr

2 Likes

Absolutely no need to be sorry @sebavan Had I properly unit tested, I would have noticed way sooner.