Skip to content

Commit

Permalink
Fix render item sorting (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
mokiat authored Sep 22, 2024
1 parent 0a5b668 commit 9d5a13a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions game/graphics/stage_mesh.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ func (s *meshRenderer) sortRenderItems(items []renderItem) {
sort.Slice(items, func(i, j int) bool {
a, b := &items[i], &items[j]
return cmp.Or(
a.Layer < b.Layer,
a.MaterialKey < b.MaterialKey,
a.ArmatureKey < b.ArmatureKey,
)
cmp.Compare(a.Layer, b.Layer),
cmp.Compare(a.MaterialKey, b.MaterialKey),
cmp.Compare(a.ArmatureKey, b.ArmatureKey),
) == -1
})
}

Expand Down

0 comments on commit 9d5a13a

Please sign in to comment.