cronvel
October 28, 2020, 11:09am
1
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:
cronvel
October 28, 2020, 12:45pm
3
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