when use each of them same parameters difference notice how close 'camera' objects. difference here, , preferred 2d game?
i don't agree leffelmania, although answer accepted, explain again frustum , differences between orthographic , perspective projections are.
a frustum pyramid without top shaped 3d object (in link defined space between znear , zfar plane).
the frustum used determine camera can see. inside or intersects camera's view-frustum has rendered, rest can ignored.
because frustum difficult shape intersection checks on, matrix transform constructed view frustum transformed cube. matrix transform applied scene objects can simple 'does intersect cube' check. called canonical view frustum (see more info here)
now perspective vs orthographic projection. in picture see camera, or center of projection (cop). in perspective projection cop near near plane. rays positions on far plane pointing @ cop. these rays intersect near plane (aka viewport) pixel colored according color of closest thing near plane ray hit. perspective projection leads (multiple) vanishing points , objects further away camera smaller, parallel lines in world not parallel on picture.
in orthographic projection cop infinitely far away, rays parallel each other. there no vanishing point, more distant objects not drawn smaller , parallel lines in world parallel on picture.
Comments
Post a Comment