Depth sort based on overlapping regions