I'm encountering a weird issue that I'm having trouble understanding.
I'm using DX9, and am attempting to render a position only vertex. in the vertex shader. In the vertex shader stage I add a COLOR0 semantic to the output, which I fill in with float4(y,y,y,1) where y is the world space position of the vertex. In the pixel shader I just output that color. I am getting only white, no matter what height of the vertex.
However if i set the color to (1,0,0,y) I end up with the vertices colored properly, with variation between Black -> Grey -> White with a world space y of <0 -> 0..1 -> >1. I'm perplexed, as this is the output I'd expect from shader described in the previous paragraph, while i would expect the range from black to red with this.
So I'm pretty sure the vertex shader is working, but the pixel shader is not getting, or not using the correct value. Is this due to the vertices' declaration as a position only vertex? If so, can anyone explain why?
I know I can add the COLOR0 semantic to the vertices vertex declaration, and bring it through the shader stages if necessary, I just can't comprehend why I should need to in this situation.