Skip to content

Commit

Permalink
Fix broken canonicalize index buffer with restarts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Themaister committed Dec 14, 2023
1 parent 378f54e commit 6a13c5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions renderer/formats/scene_formats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,9 @@ bool mesh_canonicalize_indices(SceneFormats::Mesh &mesh)
{
bool emit_primitive = true;
if (mesh.primitive_restart &&
unrolled_indices[i - 2] == UINT32_MAX &&
unrolled_indices[i - 1] == UINT32_MAX &&
unrolled_indices[i - 0] == UINT32_MAX)
(unrolled_indices[i - 2] == UINT32_MAX ||
unrolled_indices[i - 1] == UINT32_MAX ||
unrolled_indices[i - 0] == UINT32_MAX))
{
emit_primitive = false;
primitive_count_since_restart = 0;
Expand Down

0 comments on commit 6a13c5a

Please sign in to comment.