Change the emissive texture of an material

Hello I would like to change the emissive texture of a material but when I make this change by the code through this [PLAYGROUND] (https://playground.babylonjs.com/#7QCYPB#68), the texture applies any way… Whereas if I change my texture manually with the inspector and I take the same texture in my computer, the texture applies perfectly

My problem :

The result if I change my emissive in the babylon inspector :

You need to invert texture (vScale) when applying, in GLB model it is done automatically.

LightMat.emissiveTexture.vScale = -1; 

Example - https://playground.babylonjs.com/#7QCYPB#70

3 Likes

Thanks a lot, I had made a guess on a similar principle and to test I had mirrored my image in photoshop. So it was kind of the idea to reverse it but I didn’t use the right idea.

1 Like