Function meshopt::shadow::generate_shadow_indices_decoder [−][src]
pub fn generate_shadow_indices_decoder<T: DecodePosition>(
indices: &[u32],
vertices: &[T]
) -> 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 first vertex_size bytes) 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.