Skip to main content

pack_params

Function pack_params 

Source
pub fn pack_params(
    res: u32,
    verts_per_chunk: u32,
    attr_w: u32,
    chunk_count: u32,
    tile_res: u32,
    bump_enable: f32,
    terrain: &TerrainGpu,
    surface_enabled: f32,
    surface_height_scale: f32,
) -> Vec<u8> 
Expand description

Pack one ChunkParams (header + terrain + tile_res + bump + surface) into its buffer. surface_enabled/surface_height_scale drive the CPU-surface path (pass 0.0, 0.0 when the CPU surface is irrelevant).