0

My question is basically in my DirectX11 pixel shader, why am I getting a range of values from -256.0 to 256.0 in the SV_POSITION input instead of the supposed values from 0.0 to ViewportWidth and 0.0 to ViewportHeight?

I am setting explicitly the viewport right before the draw call and when debugging with PIX, the state of the Device Context is showing me the viewport values correctly. I need to do a fast lookup to a buffer that has the same dimensions as the render target so I might as well wanted to save interpolating some textcoords to the pixel shader.

Am I missing something that is setting up the ranges incorrectly?

  • 1
    How are you determining that SV_POSITION in the pixel shader can be negative? I'm not aware of any circumstances under which that can occur. – Adam Miles May 16 '15 at 12:04
  • 1
    You need to provide your input layout description, your vertex shader inputs and outputs, and your pixel shader inputs to get any help with this... – Chuck Walbourn May 17 '15 at 18:56

0 Answers0