Well of course this wont work becasue you are putting in a pxel shader before a vertex shader..and your 2 passes have to have differnt names! and you are also mixing fixed functions with shaders, which while not impossible, doest work this way. Having looked at you pixel shader and vertex shader anyway.. they seem to serve no purpose at all.. why would you calculate the dot product and such in fixed functions and then just mul the base textures in a pixel shader? it would wipe out everything you did in the fixed functions. and that vertex shader is completely pointless...my advice is take a look at some shaders on this board and see how they are set up.