Skip to content

Commit

Permalink
Fix normal conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
PikminGuts92 committed Feb 1, 2025
1 parent d41f473 commit 6a55b68
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/grim/src/model/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1240,9 +1240,8 @@ impl GltfExporter {
let norm_idx = acc_builder.add_array(
format!("{}_norm", mesh.get_name()),
mesh.get_vertices().iter().map(|v| {
// PS2 norms aren't normalized?
let v = na::Vector3::new(v.pos.x, v.pos.y, v.pos.y).normalize();
[v[0], v[1], v[2]]
let v = na::Vector3::new(v.normals.x, v.normals.y, v.normals.z).normalize();
[v.x, v.y, v.z]
}),
BufferType::Mesh
);
Expand Down

0 comments on commit 6a55b68

Please sign in to comment.