-
-
Notifications
You must be signed in to change notification settings - Fork 35
simplify matrix vector multiplication #132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: shadercross
Are you sure you want to change the base?
Conversation
| c1: @Vector(4, f32), | ||
| c2: @Vector(4, f32), | ||
| c3: @Vector(4, f32), | ||
| const Mat4 = struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packedness is lost due to using an array, which does not guarantee memory layout. The sample still works (atleast for me). If packedness is of importance i will rewrite the changes both cpu and gpu side with the original struct fields and the simplified maths
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm now this is a good question. If we mark the struct as extern that conforms to the C ABI packing right? But is that consistent across platforms?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think the extern mark should work 👍
changes