Hey.
Im having some problems with normal mapping a terrain mesh.
The normals map was created in world machine and the normals dont much up with what you would expect from the lighting direction in unity. The mesh normals work fine.
I think its just something simple like flipping a axis on the normal map but cant get it to work no matter what I flip.
To help me figure it out I decided to render the normals as the color to see what the issue is. The mesh normals in world space look as you expect the to. They are mostly green on flat areas and fade between blue/red/black on curves.
The unpacked normals form the normal map look mostly blue just like the normal map texture. This would suggest the normals are still in tangent space. I was expecting them to be in world space after being unpacked?
Can someone confirm they are meant to be in world or tangent space so I can rule out that as the problem.
If they are in tangent space can some please tell of a why to convert they to world space in the fragment program so I can render them as the color and compare to mesh normals to help debug.
Thanks