   shader and light type
  Hy.I'm create a phong shader with 0 to 4 light source using the direction of the lights sources , my question is this is only for directional light ? how i do when there are a spot light or a point light?I must create another shader?There is some of already done for not reinventing the weel?Thanks   
  If I have understood you correctly, you are asking how to import data for the point/spot lights exept from their direction. Here is my effect code if it would help. It calculates the light(ambient+diffuse+spetecular) for 1 directional light and 1 point light:The methods(in pixel shder)-float SpecularLightingFactor(float3 mnLightDir, float3 normal, float3 nEye, float exp){// Compute the half vectorfloat3 half_vector = normalize(mnLightDir + nEye);// Compute the angle between the half vector and normalfloat HdotN = dot(half_vector, normal);// Compute the specular colourreturn pow(2 * pow(HdotN, 2) - 1 , exp);}float3 CalculateFinalColor(float3 baseColor, float3 position, float3 normal){float3 diffuseDirectionalLightingFactor = 0;float3 diffusePointLightingFactor = 0;float3 specularDirectionalLighting = 0;float3 nEye = normalize(xCameraPosition - position);if (xEnableDirectionalLighting){float baseDiffuse = dot(normal, -xLightDirection);if(baseDiffuse > 0)//Only if the face doesn't block the light{float antiSelfShadow = saturate(4 * dot(normal, normalize(-xLightDirection)));diffuseDirectionalLightingFactor = baseDiffuse * antiSelfShadow * xDirectionalLightPower;if (xEnableSpecularLighting){specularDirectionalLighting = SpecularLightingFactor(-xLightDirection, normal, nEye, xSpecularExponent) * xDirectionalLightPower;}}//else they are both zero}if (xEnablePointLighting){//diffusePointLightingFactor = DiffusePointSelfShadowedLightingFactor(xLightPos, position, normal) * xLightPower;float3 mLight = xLightPos - position;float square = dot(mLight, mLight);//= 1 / attfloat3 mnLightDir = mLight / sqrt(square);float baseDiffuse = dot(mnLightDir, normal);if (baseDiffuse > 0){baseDiffuse /= (square);float antiSelfShadow = saturate(4 * dot(normal, mnLightDir));diffusePointLightingFactor = baseDiffuse * antiSelfShadow * xLightPower;if (xEnableSpecularLighting){specularDirectionalLighting += SpecularLightingFactor(mnLightDir, normal, nEye, xSpecularExponent) / square * xLightPower ;}}}float3 ambient = xAmbient;float3 diffuse = diffuseDirectionalLightingFactor + diffusePointLightingFactor;float3 specular = specularDirectionalLighting;return (baseColor * (xAmbient +  diffuse) + specular);}Every variable which start with x(that is in this format "xVar" while the Var could be anything), is an input from DirectX.I hope this sample will help you create point lights, and I'm sorry but I don't have any code for spot lights...   