bevy/crates/bevy_render/src/mesh
devil ira 48ac955afd Fix loading non-TriangleList meshes without normals in gltf loader (#4376)
# Objective
Make it so that loading in a mesh without normals that is not a `TriangleList` succeeds.

## Solution
Flat normals can only be calculated on a mesh made of triangles.
Check whether the mesh is a `TriangleList` before trying to compute missing normals.

## Additional changes
The panic condition in `duplicate_vertices` did not make sense to me. I moved it to `compute_flat_normals` where the algorithm would produce incorrect results if the mesh is not a `TriangleList`.

Co-authored-by: devil-ira <justthecooldude@gmail.com>
2022-03-31 20:43:01 +00:00
..
mesh Fix loading non-TriangleList meshes without normals in gltf loader (#4376) 2022-03-31 20:43:01 +00:00
shape Mesh vertex buffer layouts (#3959) 2022-02-23 23:21:13 +00:00
mod.rs Mesh Skinning. Attempt #3 (#4238) 2022-03-29 18:31:13 +00:00