-
Notifications
You must be signed in to change notification settings - Fork 78
Matrix4x3 v2 #433
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: main
Are you sure you want to change the base?
Matrix4x3 v2 #433
Conversation
db60a40 to
ce5d860
Compare
e3acc34 to
404c094
Compare
| /// Primarily used in ray tracing extensions to represent object rotation, scale and translation. | ||
| /// | ||
| /// # Limitations | ||
| /// These Limitations apply to all structs marked with `#[spirv(matrix)]`, which `Matrix4x3` is the only one in |
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.
This feels a bit too inward facing. Just state the limitations. I guess you can optionally ask for a task.
| pub y: Vec3A, | ||
| pub z: Vec3A, | ||
| pub w: Vec3A, | ||
| pub x_axis: Vec3A, |
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.
Why did this change? Is it more or less consistent with other APIs?
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.
More consistent, now the member names are the same of glam's matrices. Split it out into a separate commit to make it easier to reason about
rust-gpu/crates/spirv-std/src/matrix.rs
Lines 29 to 38 in 951a990
| impl Matrix4x3 { | |
| /// Convert from glam's [`Affine3A`] | |
| pub fn from_affine3a(affine: Affine3A) -> Self { | |
| Self { | |
| x_axis: affine.x_axis, | |
| y_axis: affine.y_axis, | |
| z_axis: affine.z_axis, | |
| w_axis: affine.w_axis, | |
| } | |
| } |
404c094 to
786a458
Compare
786a458 to
951a990
Compare
Requires #380