Edit: Added images at the bottom to show the current issue.
I have the following few lines in my hlsl pixel shader where color and specular are both float4.
color = color * textureColor; // Add specular component and clamp color = saturate(color + specular);
Running VS2013 graphics debugger and debugging into the pixel shader I see specular coming through as (0.0f, 0.0f, 0.0f, 0.0f) which I expect for the pixel I'm checking since it's not within the specular portion of the viewDirection, but the float4 addition is making the final color as zero after the addition.
Am I completely missing something here? I would assume the following math:
color (0.65f, 0.0f, 0.0f, 1.0f) + specular (0.0f, 0.0f, 0.0f, 0.0f) result = (0.65f, 0.0f, 0.0f, 1.0f)
Any thoughts would be greatly appreciated. I have a feeling, I'm missing something really simple here.
// If I remove the specular and return color after multi by tex Sample, // I get the following expected result color = color * textureColor;
// As soon as I add the specular component back in color = saturate(color + specular);