Function meshopt::optimize::optimize_overdraw_in_place[][src]

pub fn optimize_overdraw_in_place(
    indices: &[u32],
    vertices: &VertexDataAdapter<'_>,
    threshold: f32
)

Reorders indices to reduce the number of GPU vertex shader invocations and the pixel overdraw.

indices must contain index data that is the result of optimize_vertex_cache (not the original mesh indices!)

threshold indicates how much the overdraw optimizer can degrade vertex cache efficiency (1.05 = up to 5%) to reduce overdraw more efficiently.