Make sure normals or imported meshes are unit length.
This commit is contained in:
parent
29dc3b6a37
commit
aa942a2a3c
|
|
@ -27,7 +27,7 @@ mod wavefront_obj {
|
||||||
Some(normal_index) => convert(Vector3::from_row_slice(&normal_positions[normal_index])),
|
Some(normal_index) => convert(Vector3::from_row_slice(&normal_positions[normal_index])),
|
||||||
None => Vector3::zeros(),
|
None => Vector3::zeros(),
|
||||||
};
|
};
|
||||||
(vertex, normal)
|
(vertex, normal.normalize())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_triangles<T: Real>(
|
fn get_triangles<T: Real>(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue