When applying a specular shader function to my pixel shader, the highlights appear correct but I get some odd artifacts in the color. I'm using a basic Blinn-Phong specular implementation. The artifacts are some banding of darker colors in the bright white color of the highlight, kinda like a Moire pattern but not really. They become more apparent with higher specular powers.
This is done in a lighting pass for a deferred renderer by the way. It's drawing to a HDRblendable render target, don't know if that's relevant or not. I will post a screenshot later that shows the problem. For now, here is the specular shader code that I am using:
// Blinn D1 (Phong) specular distribution
float BlinnPhong(float3 normal, float3 view, float3 light, float specPower)
float3 halfVector = normalize(light + view);
return pow(saturate(dot(normal, halfVector)), specPower);
// How it's used in the main function
float specLight = specIntensity * BlinnPhong(normal, directionToCamera, lightDirection, specPower);