Expand description
What every backend compiles for a world Shader.
What a world Shader compiles to, on every backend.
A world Shader defines two hooks, transform and shade, and the engine’s
own main-pass entries call them. So a world shader compiles as the engine’s
main-pass programs do, from main_bindless.slang, with the world’s files
spliced at the hook markers in place of the engine’s defaults. The cook
iterates this table to compile a Shader ahead of time and each renderer
iterates it to find what the cook left.
Structs§
Enums§
- Stage
- Whether an entry runs at the vertex or the fragment stage.
Constants§
- ALL
- Every entry a world Shader compiles: the bindless pair, on every host.
- FRAGMENT_
MARKER - The marker the world’s
fragmentfile is spliced at. - VERTEX_
MARKER - The marker the world’s
vertexfile is spliced at.
Functions§
- defines
- The variant defines for one entry on one host.
pool_sizeandprobe_countare the bindless texture-pool length and the probe cube array length the Vulkan host declares; the cook bakes the ceilings and a device that cannot seat them recompiles, exactly as the engine’s own bindless programs do. Metal and DirectX bind fixed counts. - groups
- How a host’s entries group into artifacts. Metal takes the pair as one library: slangc emits one MSL translation unit and the runtime wants one library to pull both functions out of. The other two hosts take one artifact per entry.
- program
- The entry named
entry. - programs
- The entries a host compiles for a world Shader.
- source
- The same source from the embedded templates alone.
- source_
with - The exact source text one entry compiles for one host with the world’s
files spliced in.
resolvelets a hot-reload build prefer the checkout’s copy of the templates over the embedded ones.