Function meshopt::shadow::generate_shadow_indices_multi[][src]

pub fn generate_shadow_indices_multi(
    indices: &[u32],
    vertex_count: usize,
    streams: &[VertexStream<'_>]
) -> Vec<u32>

Generate index buffer that can be used for more efficient rendering when only a subset of the vertex attributes is necessary. All vertices that are binary equivalent (wrt specified streams) map to the first vertex in the original vertex buffer.

This makes it possible to use the index buffer for Z pre-pass or shadowmap rendering, while using the original index buffer for regular rendering.