Skip to content
Snippets Groups Projects

Faster and more correct OGL transparent surface sorting

Merged Hannu Hanhi requested to merge Hannu_Hanhi/SRB2:ogl-drawnode-fix into next

This patch fixes some ordering issues in HWR_CreateDrawNodes. It also makes it faster by replacing the

O(n^2)
bubble sort algorithm with
O(n \log n)
quick sort.

Comparison images:

Before After
before after
before after

Performance comparison:

Before After
before 558 microseconds after 26 microseconds
before 490 microseconds after 41 microseconds

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading