Skip to main content

Module raymarch

Module raymarch 

Source
Expand description

What every backend compiles for the raymarched SDF volume pass. What the raymarched SDF volume pass compiles, on every backend.

The other two tables here are per-backend because the backends compile different sets. This one is shared: all three compile the same six entries out of raymarch.slang, differing only in the ABI define and in what slangc is asked to emit. The cook iterates it to compile a volume’s field ahead of time and each renderer iterates it to find what the cook left.

Structs§

Program
One entry point of one family.

Enums§

Family
Which of the three draws an entry belongs to. A volume compiles one of the first two, plus the third when it casts shadows.
Stage
Whether an entry runs at the vertex or the fragment stage.

Constants§

ALL
Every entry raymarch.slang declares.
BODY_MARKER
The marker a volume’s authored distance field is spliced at.
FILE
The shader file every entry below compiles from.
SCENE_TAP
The helper an authored shade calls to read the scene behind the surface.

Functions§

abi_define
The ABI define naming a host’s binding layout. Vulkan takes the source’s #else branch and so needs none, which is why this is an Option.
defines
The variant defines for one family on one host.
families
The families a volume draws with: its own, plus the shadow caster when it casts one. A volumetric medium never casts, so the pair is exclusive.
field_taps_scene
Whether an authored distance field reads the scene behind the surface.
programs
Every entry a volume with these flags needs compiled.
source
The same source from the embedded templates alone.
source_with
The exact source text one family compiles for one host, with field spliced in as the world’s distance field. resolve lets a hot-reload build prefer the checkout’s copy of the template over the embedded one.