I do promise this will be my last post about normal maps for today, as I finally got them to work as I wanted.
Due to the way MS has written their shaders, some special care is needed when constructing your normal map texture. If you just use the plugins that are made for it, the shading of your object will be wrong in FS. So take these steps to get the correct result:
- First make sure you have a bump map for your texture
- Convert it into a normal map with the plugin
- Copy the content of the red channel to the alpha channel
- Make the red channel black
- Invert the green channel
- Make the blue channel white
Now you can use your normal map, simple add it under the bump map slot of your material and save the DDS as DXT5. It is important to use DXT5 as it has an 8 bit alpha channel and also keeps the quality of the green channel quite good during compressing. So this will mean the compression does not hurt your bump map too much.
So it means a little work when making your normal map, but I can understand why MS made the shader like this. It ensures we can use compressed textures, without the quality of the bump map being reduced a lot.