mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
Note way matrix needs to be round. (#6776)
This commit is contained in:
parent
8f2f5e913a
commit
9ed716954f
@ -128,11 +128,13 @@ struct RayIntersection {
|
||||
front_face: bool,
|
||||
// Matrix for converting from object-space to world-space.
|
||||
//
|
||||
// Bug: This matrix need to be transposed currently otherwise it will not work properly.
|
||||
// This matrix needs to be on the left side of the multiplication. Using it the other way round will not work.
|
||||
// Use it this way: `let transformed_vector = intersecion.object_to_world * vec4<f32>(x, y, z, transform_multiplier);
|
||||
object_to_world: mat4x3<f32>,
|
||||
// Matrix for converting from world-space to object-space
|
||||
//
|
||||
// Bug: This matrix need to be transposed currently otherwise it will not work properly.
|
||||
// This matrix needs to be on the left side of the multiplication. Using it the other way round will not work.
|
||||
// Use it this way: `let transformed_vector = intersecion.world_to_object * vec4<f32>(x, y, z, transform_multiplier);
|
||||
world_to_object: mat4x3<f32>,
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user