Skip to main content

Module compiled_programs

Module compiled_programs 

Source
Expand description

One compiled shader artifact and the digest-keyed lookup over a set of them, shared by every asset whose shader source is only complete once a world is loaded: an SdfVolume’s distance field and a Shader’s hooks.

The cook runs slangc and stores what it emitted; the renderer assembles the source it expects, digests it, and takes a stored artifact only on a match. A hot-reload edit to an engine template misses every entry and recompiles, which is the behaviour that makes editing one possible at all.

Structs§

CompiledProgram
One compiled artifact, the entries it holds, and the source it came from.

Functions§

artifact
The artifact holding entry, if one was compiled from source matching digest. A mismatch is a stale artifact and reads as absent.