Sign in to follow this  

Matrix Multiplication (Basic Question)

This topic is 2793 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

It's probably because different conventions are being used in your code than are being used in the GLSL code.

Matrix 'majorness' may be an issue if you've got your indexing wrong (e.g. within your multiplication function or in the functions that build your matrix transforms). The other likely culprit is differing vector notation conventions (i.e. row vectors vs. column vectors).

A good first step would probably be to make sure you know what matrix layout (row-major or column-major) and vector notation convention (row vectors or column vectors) are being used in your own code, and are being assumed by the GLSL code (so that's four things you need to check in total). If there's a mismatch anywhere, you'll need to adjust accordingly.

Also, if you're not sure your multiplication code is right, you can post it here for us to take a look at (if you're using 1-d indexing, make sure to let us know whether your matrices are row-major or column-major).

Share this post


Link to post
Share on other sites

This topic is 2793 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this