Is there a way to do a quick and dirty 3D distance check where the results are rough, but it is very very fast? I need to do depth sorting. I use STL sort like this
sort
If you could center your coordinates around the player, use spherical coordinates? Then you could sort by the radius.
That's a big if, though.