Jump to content
  • Advertisement
Sign in to follow this  
td1

GLSL matViewProjection

This topic is 2562 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Trying to implement a shader using opengl and GLSL. The shader requires matViewProjection, which I have no clue what it is or how to properly calculate it. Any assistance would be appreciated.

Share this post


Link to post
Share on other sites
Advertisement
Without seeing the shader and judging by the name I'm guessing this is a 4x4 matrix that is equal to the ProjectionMatrix * the ModelViewMatrix

ModelView matrix can start out as the 4x4 identity matrix and from there it's not too hard to figure out how to translate/rotate the view.

ProjectionMatrix is going to be either Orthographic or Perspective most likely

The GLM math library has functions for these http://glm.g-truc.net/api-0.9.2/a00163.html

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!