Skip to main content

Module raymarch

Module raymarch 

Source
Expand description

A user shader for RayMarchNode exports vs_fullscreen(@builtin(vertex_index)) and fs_main(@builtin(position)) and binds RayMarchUniforms at group 0, binding 0.

Modules§

scene
Emit contract, shared by the 3D and 4D paths: every baked constant goes through literal::wgsl_f32, so parsing the emitted literal recovers the exact input bits and the emitter contributes no floor to CPU/GPU parity.

Structs§

BodyUniform
80 bytes, matching the kernel’s BodyUniform; the rotor packs as two vec4.
Hyperslice4DNode
Hyperslice4DUniforms
Bind group 0, binding 0; matches the kernel’s Uniforms.
RayMarchNode
RayMarchUniforms
Bind group 0, binding 0, std140: every vec3 pads to 16 bytes.

Enums§

BodyKind
Written as f32; the shader reads it back as u32.
RaymarchShape

Constants§

HYPERSLICE_KERNEL_WGSL
Prefixed with crate::sky_ground::SKY_GROUND_WGSL and the shared loam_projective_depth; the user’s Scene4 emit supplies loam_scene_sdf.
SHAPE_3SPHERE
SHAPE_16CELL
SHAPE_24CELL
SHAPE_120CELL
SHAPE_600CELL
SHAPE_CLIFFORD_TORUS
SHAPE_DUOCYLINDER
SHAPE_PENTATOPE
Mirrored as SHAPE_* in HYPERSLICE_KERNEL_WGSL; keep in sync.
SHAPE_SPHERINDER
SHAPE_TESSERACT

Functions§

polytope4_from_shape_id
None for the smooth-surface SDFs.
polytope_extended_sdfs_wgsl
Exact signed distance inside; a conservative distance bound outside.
polytope_stub_sdfs_wgsl
Include the stubs only when neither extended polytope appears in the scene.