   Directional light and Specular problem
  Hi,i am not really sure what i have wrong in my code, but result with directiona light looks like thisThere is very good to see, that in one point is wall lightened with point light.I am calculating light in Vertex Shader:float3 wLight = xLightDirection; //light directionfloat3 scaledPos = mul(float4(PSIn.pos, 1), wordlMatrix).xyz float3 wEye = xEyePos - scaledPos; //xEyePos - position of camera; scaledPos - player position ...Output.light = normalize(mul(wLight, tanMat));Output.halfway = normalize(mul((wEye + wLight), tanMat)); //tanMat is tangentMatrixOutput.Position = mul(float4(scaledPos, 1), xViewProjection);And in PixelShader://n = normal value from bump map or from normal directly from VSn = (n - 0.5f) * 2.0f;n = normalize(n);float3 h = normalize(Input.halfway);float nDoth = saturate(dot(n, h));float power = (nDotL == 0.0f) ? 0.0f : pow(nDoth, 100);    Anyone see something wrong ?   
Quote:Original post by martinperry...Output.halfway = normalize(mul((wEye + wLight), tanMat)); ...What you are doing there is incorrect. It should instead read:Output.halfway = mul(normalize(wEye + wLight), tanMat);Not sure if that is "the" problem, but it is definitely "a" problem.   ;  That was "a" problem, but not "that" problem.... so light is still incorrect   