Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8101157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:55:00+00:00 2026-06-05T22:55:00+00:00

I just read an article on www.songho.ca which indicates that a projection matrix is

  • 0

I just read an article on http://www.songho.ca which indicates that a projection matrix is defined by:

[2n/(r-l) 0        (r+l)/(r-l)  0            ]
[0        2n/(t-b) (t+b)/(t-b)  0            ]
[0        0        -(f+n)/(f-n) -2*n*f/(f-n) ]
[0        0        -1           0            ]

where:

n: near
f: far
l: left
r: right
t: top
b: bottom

I have also read on http://www.geeks3d.com of an alternate definition given by:

[w 0 0  0]
[0 h 0  0]
[0 0 q -1]
[0 0 qn 0]

where:

w=(2*near)/(width * aspect)
h = 2near/height
q=-(far+near)/(far-near)
qn=-2*(far*near) / (far-near)

Why are there differences in M[0][2] and M[1][2] (excluding one is the transposed of other)? Do they generate the same result? Which one is posible to use in GLSL without any transpose?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:55:00+00:00Added an answer on June 5, 2026 at 10:55 pm

    The first matrix allows you to arbitrarily position the left, right, top and bottom clip plane positions. The second one always gives you a centred, symmetric frustum, which is kind of limiting. For example when you’re doing stereoscopic rendering you want to slightly shift the left and right plane.

    BTW, which one is posible to use in GLSL without any transpose?

    This has nothing to do with GLSL. You can use either. The transpose you’re referring to stems from the way matrices are represented internally in OpenGL and interfaces to the outside world.

    Anyway, you should not hardcode matrices into shader source code, but supply them through a Uniform.

    Update

    OpenGL orders its matrices column major, i.e.

    0 4 8 c
    1 5 9 d
    2 6 a e
    3 7 b f
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just read this article: http://www.acunetix.com/websitesecurity/upload-forms-threat.htm which discusses some of the security risks involved
I just read an article that explains the zero-copy mechanism. It talks about the
I've just read an article that supposedly introduced me to a new concept: Up
I just read this nice article that taught me how to use inheritance (Table-per-hirarchy).
I just read an article on the C++0x standard: http://www.softwarequalityconnection.com/2011/06/the-biggest-changes-in-c11-and-why-you-should-care/ It said nullptr was
I've just read an article detailing the functionality of MS's Ajax.BeginForm ( http://www.aspnetpro.com/articles/2009/06/asp200906de_f/asp200906de_f.asp )
I just read in a best practices article for jquery and ajax that I
I just read an article that describes how HttpApplicationState has AcquireRead() / AcquireWrite() functions
I've just read about @Resource annotation from this article ( http://www.infoq.com/articles/spring-2.5-part-1 ) and wish
I just read the article Programming by Coincidence . At the end of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.