Sunday, 11 August 2013

OpenGL spectrum between perspective and orthogonal projection

OpenGL spectrum between perspective and orthogonal projection

In OpenGL (all versions, though I happen to be working in OpenGL ES 2.0)
there is the option of using a perspective projection versus an orthogonal
one. Is there a way to control the degree of orthogonality?
For the sake of picturing the issue (and please don't take this as the
actual question, I am well aware there is no camera in OpenGL) assume that
a scene is rendered with the viewport "looking" down the -z axis. Two
parallel lines extending a finite distance down the -z axis at (x,y)=1,1
and (x,y)=-1,1 will appear as points in orthogonal projection, or as two
lines that eventually converge to a single pixel in perspective
projection. Is there a way to have the x- and y- values represented by the
outer edges of the screen remain the same as in projection space - I
assume this requires not changing the frustum - but have the lines only
converge part of the way to a single pixel?

No comments:

Post a Comment