Expand description
The SdfVolume asset: the authored schema (the struct, its Default,
cone_ratio, and SDF_PARAMS_LEN), the Component impl, the blob-residency
helper the engine init uses, and the runtime step-count clamp bounds. The
JSON-args source selection, validation, and the bake-time clamp live in
concinnity-cook (authoring::source_args, check::sdf_volume,
authoring::validate::sdf_volume).
Structs§
- SdfVolume
- A raymarched signed-distance-field volume. It occupies a world-space bounding box; a user-authored fragment shader sphere-traces an SDF inside the box, composites correctly with the surrounding scene through the depth buffer, and shades hits with the engine’s lighting helpers.
Constants§
- SDF_
MAX_ STEPS_ CEILING - Hard cap on the per-volume cone-march step count. Matches the runtime kernel’s loop bound; values above this are clamped.
- SDF_
MAX_ STEPS_ FLOOR - Lower bound on the per-volume cone-march step count. Below this the march doesn’t have enough budget to converge on anything interesting.
- SDF_
PARAMS_ LEN - Per-volume parameter slots packed into a single fixed-size uniform block. The user shader casts the bound buffer to its own typed struct; the engine just transports the bytes. Sized to comfortably fit a flow-water shader (flow speed, wave coefficients, deep + shallow colours, foam params, …) without forcing schema design.
Functions§
- sdf_
volume_ blob_ indices - Blob indices that hold an
SdfVolumefragment-shader payload.