Skip to main content

ScatterParamsGpu

Struct ScatterParamsGpu 

Source
#[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: u32

Chunks in this realize batch (place dispatch domain).

§capacity: u32

Per-slot pool capacity C = k_per_cell * 4^S_MAX.

§k_per_cell: u32

Candidates per lattice cell (K).

§lod_level: u32

The layer’s LOD level (== the stable world lattice level L in celestial_algo::scatter).

§radius: f32

Sphere radius.

§density: f32

LIVE: fraction of candidates drawn (hash01 < density).

§max_instances: u32

MultiMesh pool cap (compact clamps its atomic counter to this).

§seed: u32

Layer placement seed.

§vis_count: u32

Visible instances (compact dispatch domain).

§min_height: f32

LIVE: 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: f32

LIVE: max normalized terrain height (0..1); above it, nothing scatters (1.0 = no upper limit → keep grass off peaks by lowering this).

§base_scale: f32

Per-layer base scale multiplier (place-side: baked into the transform).

§surface_enabled: f32

CPU-surface route gate (mirrors ChunkParams.surface_enabled): non-zero ⇒ place samples the baked heightmap instead of the procedural noise.

§surface_height_scale: f32

CPU-surface displacement scale (CpuSurfaceProvider::height_scale) — must equal ChunkParams.surface_height_scale or instances float/sink.

§tile_res: u32

Detail-tile resolution: the per-slot heightmap is tile_res² floats.

§_pad: u32§terrain: TerrainGpu

Terrain noise params — displacement must match ChunkRealize.slang.

§_pad2: f32

Tail padding keeping the struct a 16-byte multiple (std430 stride rule).

§_pad3: f32

Trait Implementations§

Source§

impl Clone for ScatterParamsGpu

Source§

fn clone(&self) -> ScatterParamsGpu

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ScatterParamsGpu

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ScatterParamsGpu

Source§

fn eq(&self, other: &ScatterParamsGpu) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Zeroable for ScatterParamsGpu

§

fn zeroed() -> Self

Source§

impl Copy for ScatterParamsGpu

Source§

impl Pod for ScatterParamsGpu

Source§

impl StructuralPartialEq for ScatterParamsGpu

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CheckedBitPattern for T
where T: AnyBitPattern,

§

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

If this function returns true, then it must be valid to reinterpret bits as &Self.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> AnyBitPattern for T
where T: Pod,

§

impl<T> NoUninit for T
where T: Pod,