Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


schobbejak

Member Since 26 Jul 2012
Offline Last Active May 16 2013 08:15 AM

Topics I've Started

confusion about depth and perspective

26 July 2012 - 09:06 AM

Here are my assumptions about perspective divide, can someone tell me which one(s) is/are wrong?

0: When doing a perspective divide, vertex positions are divided by the viewspace z position. (stored in .w component)
1: When doing perspective scaling, the correct way to go is: divide by the distance between camera and vertex.
2: viewspace z position is NOT equal to the distance from the camera to the vertex. (unless that vertex is in the middle of the screen, and the nearplane is 0).

An example of point 2: considering a camera with 90 degrees fov, the distance from the camera to a point on the farplane at the border of the screen is greater than or equal to [sqrt(2)* farplane], but in the middle it would be [farplane].

PARTNERS