Skip to content

[BUG] find_best_vertex_spilt in tmf_exporter.rs panics if best_split_index is the last vertex #22

@dbartussek

Description

@dbartussek

The find_best_vertex_split function iterates over all vertices:

for (index, vertex) in vertices.iter().enumerate() {

However, immediately after the loop, there is an assertion that best_split_index may not be the last vertex:

assert!(best_split_index < vertices.len() - 1);

While testing file sizes of different formats, I've encountered a model that apparently meets this edge case, resulting in an assertion error.

This is the mesh I am trying to export. It's the dragon sample model from the official glTF samples with computed tangents, run through meshopt: dragon.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions