Skip to main content

Module shader

Module shader 

Source
Expand description

The Shader asset: the authored schema (Shader, StageSource, ShaderKind, and the ShaderPayload container), the Component impl, and the StageSourceExt::current_platform_source extension the engine init and hot-reload paths use. The JSON-args source selection and validation live in concinnity-world (source_args, check::shader).

Structs§

Shader
Declares a custom shader program: the vertex and fragment stages, plus the optional GPU-instanced vertex stage.
ShaderPayload
The compiled payload a Shader carries in the blob: every compiled stage, tagged by kind. Written by the cook, decoded once by the renderer at load.
StageSource
Source declaration for one stage of a Shader.

Enums§

ShaderKind
A stage slot within a Shader.

Traits§

StageSourceExt
Resolve the source filename for the current build platform from a stage’s declared source / sources. Mirrors the build-time selection (concinnity-world source_args) so the hot-reload subsystem picks the same per-platform source the build read at compile time. Returns None when no current-platform source is declared (e.g. a stage that only declares glsl running on the Metal backend, which loads the embedded GLSL fallback at init and has no on-disk file to hot-reload). Exposed as an extension trait because the schema type is declared above.

Functions§

platform_key
Returns the platform key used to look up entries in the sources map.