Texture mapping with normal coordinates

Hi, I was wondering how the a texture mapping that uses normal coordinates works. I specifically want to know how it works so I can get Unity to properly import a material that uses a texture with normal coordinates.

I would appreciate any help that I can get.

If the normal vector is connected directly to a texture node, it will use the X and Y components of the normal vector to sample the texture. As X and Y can be anything from -1 to 1, you’ll get a mirrored texture both in the XZ and YZ planes. Now it will only depend on the surface of your mesh, as each point will have it’s own normal, pointing to some part of the texture.
This alone is not very usefull, and normally some transformation of the normal vector is used… For example, getting the reflection vector you use Rf=dot(N,I)2N-I, and this vector can be used to map some enviroment texture into the shader.

Thank you! I managed to get it working in Unity. I had just forgotten to normalize the normal beforehand.