Function three_d::renderer::cmp_render_order
source · pub fn cmp_render_order(
camera: &Camera,
obj0: impl Object,
obj1: impl Object
) -> Ordering
Expand description
Compare function for sorting objects based on distance from the camera. The order is opaque objects from nearest to farthest away from the camera, then transparent objects from farthest away to closest to the camera.