title: reverse perspective projection
body: <p>I'm using</p>
  
  <pre><code>worldview_inverse * (projection_inverse * vector)
  </code></pre>
  
  <p>to transform screen space coordinates into world space coordinates.
  I assumed that </p>
  
  <pre><code>(x,y,1,1)
  </code></pre>
  
  <p>would transform to a point on the far plane, while</p>
  
  <pre><code>(x,y,-1,1)
  </code></pre>
  
  <p>transforms to a point on the near plane, and connecting the line I can query all objects in the view frustum that intersect the line.
  After the transformation I divide the resulting points by their respective .w component.
  This works for the far-plane, but the point on the near plane somehow gets transformed to the world space origin.</p>
  
  <p>I think this has to do with the w components of 1 I'm feeding into the inverse projection, because usually it is 1 before projection, not after, and I'm doing the reverse projection. What am I doing wrong?</p>