-
-
Notifications
You must be signed in to change notification settings - Fork 36
simplify matrix vector multiplication #132
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