It seems that BabylonJs uses the DirectX convention for normal maps.
The problem is that our material database uses the OpenGL convention. The bump direction seems to be inverted now in BabylonJs.
How can i switch between OpenGL and DirectX normal maps in BJS?
I think the green(y) channel needs to be flipped in order to convert between OpenGL and DirectX normals.
I would like to prevent a conversion of our material database because our whole toolchain is based on OpenGL conventions.
Wo
@Deltakosh i just tried your change but it is not working as expected.
It was correct to invert the y component but it seems that also the x component must be inverted.
I dont know which convention you implemented for the normal mapping in BabylonJs but it doesn't seem to be DirectX.
Here a playground: http://www.babylonjs-playground.com/#17QZZM#3
The light is coming from top-left (see the sphere) but the light on the bump map is coming from top-right.
Could you change it please that