Skip to content

Commit 9e7a0b0

Browse files
committed
Fix incorrect sign_determinant_model_3x3 output
1 parent a0aba62 commit 9e7a0b0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/mesh/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,11 @@ impl Mesh {
4949
// bool(u32) is false if 0u else true
5050
// f32(bool) is 1.0 if true else 0.0
5151
// * 2.0 - 1.0 remaps 0.0 or 1.0 to -1.0 or 1.0 respectively
52-
(if self.flags & MESH_FLAGS_SIGN_DETERMINANT_MODEL_3X3_BIT != 0 {
52+
if self.flags & MESH_FLAGS_SIGN_DETERMINANT_MODEL_3X3_BIT != 0 {
5353
1.0
5454
} else {
55-
2.0
56-
} * 2.0
57-
- 1.0)
55+
-1.0
56+
}
5857
}
5958

6059
pub fn mesh_tangent_local_to_world(&self, model: Mat4, vertex_tangent: Vec4) -> Vec4 {

0 commit comments

Comments
 (0)