Expand description
Voxel effects built on one fast mesher: smoke that rises and swirls, and drifting clouds.
Both produce a single DynamicMesh (one draw call). Hidden faces between touching voxels are
never emitted, so a large cloud costs only its visible surface.
Structs§
- Cloud
Volume - Describes the density grid of a cloud layer; its
key()goes intoMeshRenderer.texture. - Voxel
Clouds - Volumetric clouds: a voxel density grid (generated from fractal noise) that the GPU ray-marches with sun scattering and self-shadowing. The entity draws only an inverted bounding box.
- Voxel
Smoke - Voxel smoke emitter and simulation parameters. Runtime density is not serialized.
Constants§
- CLOUD_
VOLUME_ PREFIX - Prefix for procedural three-dimensional cloud density texture keys.
Functions§
- mesh_
grid - Meshes a voxel grid.
density(x, y, z)>thresholdmeans filled;uv.xcarries the density. Withshrinkevery voxel is scaled by its density (soft puffs, all faces emitted); otherwise full cubes are merged and faces between neighbours are culled. - mesh_
grid_ greedy - Merges coplanar exposed faces with equal density. Each cell is sampled once. A solid cuboid becomes six quads. Invalid parameters or >16M cells return an empty mesh.
- update_
clouds - Refreshes cloud proxy geometry and shader parameters; drift advances only while simulating.
- update_
smoke - Creates/rebuilds smoke meshes and optionally advances the density simulation by dt seconds.