My XNA HLSL Compiler keeps telling that I have unexpected ')' at the end of a subtraction. The PixelShader:
float3 lightDir = normalize(LightDirection);
float3 viewDir = normalize(input.View);
float3 normal = input.Normal;
float diff = saturate(dot(input.Normal, lightDir));
float3 reflect = normalize(2 * diff * normal - lightDir);
float specular = pow(saturate(dot(reflect, viewDir)), SpecularIntensity);
return tex2D(ColorMapSampler, input.TexCoord)
* DiffuseIntensity * DiffuseColor * diff + SpecularColor * specular);
Sometimes though it randomly works there after at another spot it "bugs" again.