Function shadow_mapping_vertex

Source
pub fn shadow_mapping_vertex(
    renderlet_id: Id<PrimitiveDescriptor>,
    vertex_index: u32,
    geometry_slab: &[u32],
    light_slab: &[u32],
    out_clip_pos: &mut Vec4,
)
Expand description

Shadow mapping vertex shader.

It is assumed that a LightingDescriptor is stored at Id(0) of the light_slab.

This shader reads the LightingDescriptor to find the shadow map to be updated, then determines the clip positions to emit based on the shadow map’s atlas texture.

It then renders the renderlet into the designated atlas frame.