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§
- Body
Uniform - 80 bytes, matching the kernel’s
BodyUniform; the rotor packs as twovec4. - Hyperslice4D
Node - Hyperslice4D
Uniforms - Bind group 0, binding 0; matches the kernel’s
Uniforms. - RayMarch
Node - RayMarch
Uniforms - Bind group 0, binding 0,
std140: everyvec3pads to 16 bytes.
Enums§
- Body
Kind - Written as
f32; the shader reads it back asu32. - Raymarch
Shape
Constants§
- HYPERSLICE_
KERNEL_ WGSL - Prefixed with
crate::sky_ground::SKY_GROUND_WGSLand the sharedloam_projective_depth; the user’sScene4emit suppliesloam_scene_sdf. - SHAPE_
3SPHERE - SHAPE_
16CELL - SHAPE_
24CELL - SHAPE_
120CELL - SHAPE_
600CELL - SHAPE_
CLIFFORD_ TORUS - SHAPE_
DUOCYLINDER - SHAPE_
PENTATOPE - Mirrored as
SHAPE_*inHYPERSLICE_KERNEL_WGSL; keep in sync. - SHAPE_
SPHERINDER - SHAPE_
TESSERACT
Functions§
- polytope4_
from_ shape_ id Nonefor 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.