### Yet ANOTHER projection question!

Posted:

**November 17th, 2019, 6:41 am**So I have the projection matrix up and running. Its in the standard form:

[2n/w] [ 0.0 ] [0.0] [0.0]

[ 0.0 ] [2n/h ] [0.0] [0.0]

[ 0.0 ] [ 0.0 ] [ f/f-n] [ 1 ]

[ 0.0 ] [ 0.0 ] [-nf/f-n] [0]

So what I don't understand is this. X and Y will be scaled to -1 to 1 coordinates, as they should.

Z will be scaled later at the w divide.

BUT, what I don't get, is that the Z stored in W is the original , non NDC Z. So when I do my w divide, I'm dividing my scaled down coordinates by the unscaled z stored in w. As a result, everything is considerably shrunk. Is this how its done?

[2n/w] [ 0.0 ] [0.0] [0.0]

[ 0.0 ] [2n/h ] [0.0] [0.0]

[ 0.0 ] [ 0.0 ] [ f/f-n] [ 1 ]

[ 0.0 ] [ 0.0 ] [-nf/f-n] [0]

So what I don't understand is this. X and Y will be scaled to -1 to 1 coordinates, as they should.

Z will be scaled later at the w divide.

BUT, what I don't get, is that the Z stored in W is the original , non NDC Z. So when I do my w divide, I'm dividing my scaled down coordinates by the unscaled z stored in w. As a result, everything is considerably shrunk. Is this how its done?