Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

enter image description here

I am trying to understand what the shear transformation (l+r/r-l & b+t/t-b) is actually doing in the projection matrix? The only thing I got till now is headache :) Can you please help?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Those components come into play when making an "off-center" projection. They are normally zero, since people usually set the left and right edges to be equal and opposite - for instance, L = -1 and R = +1, which makes (L + R)/(R - L) = 0/2 = 0. Similarly for the top and bottom edges. This makes a projection whose center (the point where all the rays converge) is behind the center of the screen, which is normally what's desired.

However, by setting the left/right/top/bottom edges to values that aren't equal and opposite, you can put the center of projection anywhere on screen, or even off the screen entirely. One use case for this is in stereo 3D projection, where the two eyes look at the same screen, but each sees a different vanishing point. There's a paper about this here: Generalized Perspective Projection.

share|improve this answer
    
Thanx! I got it! –  Evgenij Avstein Jul 2 '13 at 20:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.