In PV3D, projected Z is clipped in the range [0, 1]
but the matrix created by createPerspectiveMatrix transforms [near, far] to
[-1, 1].
/org/papervision3d/cameras/Camera3D.as
------------------------------------------------------------------
return new Matrix3D( [
f/aspect, 0, 0, 0,
0, f, 0, 0,
0, 0, -((near+far)/(near-far)), (2*far*near)/(near-far),
0, 0, 1, 0
] );
By this, polygons close to the near-plane disappear.
(Not noticeable because transformed z is not linear)
I guess
0, 0, -(far/(near-far)), (near*far)/(near-far),
would be correct.
Original issue reported on code.google.com by katsuomi...@gmail.com on 25 Aug 2009 at 4:03
Original issue reported on code.google.com by
katsuomi...@gmail.com
on 25 Aug 2009 at 4:03