forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix loading non-TriangleList meshes without normals in gltf loader (b…
…evyengine#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 <[email protected]>
- Loading branch information
Showing
2 changed files
with
11 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters