Note way matrix needs to be round. (#6776)

This commit is contained in:
Vecvec 2024-12-18 14:16:58 +13:00 committed by GitHub
parent 8f2f5e913a
commit 9ed716954f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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>,
}