Sorting entities before rendering again