How to use OpenGL normal map?

So I’m trying to use OpenGL-style normal map, and everything is inverted.

The problem is that I use a program named SpriteIlluminator and there is no option to invert the Y/Green channel.

So… I have tried to set material.invertNormalMapY = true but it does nothing (the playgraound).

The doc on invertNormalMapY specify that: “If sets to true, y component of normal map value will invert (y = 1.0 - y).”

Any idea?

Using the inspector, you can see that this option does change things:
image
image

Ok, so both X and Y needs to be inverted? I’ve read in the doc that Babylon uses DirectX normal, and that only Y (green) is inverted with respect to OpenGL. I’m a bit confused now…

Anyway, it seems to work, thanks.

No, my screenshot was only to show the switches.

It’s up to you to invert the x and/or y components or not :slight_smile: