#[repr(C)]pub struct ScatterParamsGpu {Show 19 fields
pub chunk_count: u32,
pub capacity: u32,
pub k_per_cell: u32,
pub lod_level: u32,
pub radius: f32,
pub density: f32,
pub max_instances: u32,
pub seed: u32,
pub vis_count: u32,
pub min_height: f32,
pub max_height: f32,
pub base_scale: f32,
pub surface_enabled: f32,
pub surface_height_scale: f32,
pub tile_res: u32,
pub _pad: u32,
pub terrain: TerrainGpu,
pub _pad2: f32,
pub _pad3: f32,
}Expand description
Per-layer scatter parameters, byte-identical to struct ScatterParams in
ScatterPlace.slang / ScatterCompact.slang (binding 2 / 0).
std430: a 64-byte scalar header followed by the 56-byte TerrainGpu at
offset 64, plus two tail pads; 128 bytes total (multiple of 16 per the
struct-array rule).
Fields§
§chunk_count: u32Chunks in this realize batch (place dispatch domain).
capacity: u32Per-slot pool capacity C = k_per_cell * 4^S_MAX.
k_per_cell: u32Candidates per lattice cell (K).
lod_level: u32The layer’s LOD level (== the stable world lattice level L in
celestial_algo::scatter).
radius: f32Sphere radius.
density: f32LIVE: fraction of candidates drawn (hash01 < density).
max_instances: u32MultiMesh pool cap (compact clamps its atomic counter to this).
seed: u32Layer placement seed.
vis_count: u32Visible instances (compact dispatch domain).
min_height: f32LIVE: min normalized terrain height (0..1) an instance may sit at; below it, nothing scatters (0.45 = the default sea level → no underwater).
max_height: f32LIVE: max normalized terrain height (0..1); above it, nothing scatters (1.0 = no upper limit → keep grass off peaks by lowering this).
base_scale: f32Per-layer base scale multiplier (place-side: baked into the transform).
surface_enabled: f32CPU-surface route gate (mirrors ChunkParams.surface_enabled): non-zero
⇒ place samples the baked heightmap instead of the procedural noise.
surface_height_scale: f32CPU-surface displacement scale (CpuSurfaceProvider::height_scale) —
must equal ChunkParams.surface_height_scale or instances float/sink.
tile_res: u32Detail-tile resolution: the per-slot heightmap is tile_res² floats.
_pad: u32§terrain: TerrainGpuTerrain noise params — displacement must match ChunkRealize.slang.
_pad2: f32Tail padding keeping the struct a 16-byte multiple (std430 stride rule).
_pad3: f32Trait Implementations§
Source§impl Clone for ScatterParamsGpu
impl Clone for ScatterParamsGpu
Source§fn clone(&self) -> ScatterParamsGpu
fn clone(&self) -> ScatterParamsGpu
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ScatterParamsGpu
impl Debug for ScatterParamsGpu
Source§impl PartialEq for ScatterParamsGpu
impl PartialEq for ScatterParamsGpu
Source§fn eq(&self, other: &ScatterParamsGpu) -> bool
fn eq(&self, other: &ScatterParamsGpu) -> bool
self and other values to be equal, and is used by ==.impl Copy for ScatterParamsGpu
impl Pod for ScatterParamsGpu
impl StructuralPartialEq for ScatterParamsGpu
Auto Trait Implementations§
impl Freeze for ScatterParamsGpu
impl RefUnwindSafe for ScatterParamsGpu
impl Send for ScatterParamsGpu
impl Sync for ScatterParamsGpu
impl Unpin for ScatterParamsGpu
impl UnsafeUnpin for ScatterParamsGpu
impl UnwindSafe for ScatterParamsGpu
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self.