So I've been reading documentation on HLSL and such, but I'm kinda confused about one thing... what, exactly, all the valid outputs (and I'ma kinda iffy on the inputs too).

You return a position in (x, y, z, w), so does that map directly to the screen (x, y), z-depth buffer (z) and stencil buffer (w)?

If not, how do you set what gets tested against the stencil buffer using HLSL?