I need to be able to import my normal maps at run-time. I have successfully managed to import the data and create and assign the texture. However I am getting unexpected results:
What you’re seeing there is the exact same plane and material except rotated 90 degrees each time. For some reason I’m getting different lighting based on the rotation of the object.
I’ve pasted a small sample of the two texture RGBA values HERE. I’ve copied the red channel over to alpha and nulled the red and blue channel as per some advise elsewhere on the net. If I don’t at least copy the red over to the alpha channel it won’t work at all.
I have confirmed that it is the normal map causing the problem as I can pause my game and replace the imported normal map with one that has been imported through the Unity Editor Importer and it instantly works fine.
Based on the data above it appears that Unity does more than some simple transposing of the data. I’m guessing it regenerates the red and blue channels, but even the red cahnnel is slightly different. I’m fairly confused.
