THREE MeshStandardMaterial texture map color modulation behaving differently for loaded GLB files

Whenever I load a GLB file ( that already has textures/maps configured ) using the GLTFLoader, the color reproduction of the textures ( especially the base texture ) is on point. However, if I load a version of that GLB that’s without any textures and load n apply the textures later on, the textures come out to be over-exposed with low contrast. Examples Given below.

Base Texture Sample

GLB with textures

GLB Without textures, textures loaded and applied afterwards

I may be wrong but it seems to be related to how the texture map color is modulated given a certain base color. Base Color in both the cases shown above is white though.

Why is this happening? Am I missing something? Please help!

Textures containing color information (like .map or .emissiveMap) must be marked as sRGB. If you aren’t already, you’ll also want to set .flipY=false. GLTFLoader does this automatically, but any textures loaded externally will need to be updated manually:

texture.encoding = THREE.sRGBEncoding;
texture.flipY = false;
2 Likes

It works!! Thank you for the quick response!

1 Like