In HLSL pixel shader , why is SV_POSITION different to other semantics?
- by tina nyaa
In my HLSL pixel shader, SV_POSITION seems to have different values to any other semantic I use. I don't understand why this is. Can you please explain it?
For example, I am using a triangle with the following coordinates:
(0.0f, 0.5f)
(0.5f, -0.5f)
(-0.5f, -0.5f)
The w and z values are 0 and 1, respectively.
This is the pixel shader.
struct…