Material Shaders and Normal maps

Dec 9, 2010 at 6:19 AM

First of all, good job with Xen... It looks and works great!

Now here is the deal... I am new to Xna Xen programming so I don't have much experience. Therefore I would like to know how material shader are usually done. Do you usually just have one shader per game or per level or shader for each model or even for each material? Hope you get what I am asking.

Now the next question is how do normal maps work? I know the basics I even managed to get them work with material shader, vertex buffer and else that is needed to draw a model on the fly. The problem is with the .X model. I made a character which has 2 textures applied and 2 normal maps. I named textures texturename.tga and texturenameB.tga (B for bump). So I exported the model to .X file, it works in Xen nicely, texture is applied, ligthning and stuff works with material shader but normal maps don't... and neither do alpha maps. What's the trick? I found a few topics about this around the forums but none of the solutions worked for me but perhaps I did something wrong so you can still refer to these topics and we can discouss them. I don't even have an idea if the problem is in the model I exportet or in code... should it work automatically or am I supossed to do it manually? I'm new to this :)