Expand description
Provides Shader assets for Bevy.
Modules§
- prelude
- The shader prelude.
Macros§
- load_
shader_ library - Inline shader as an
embedded_assetand load it permanently.
Structs§
- Shader
- An “unprocessed” shader. It can contain preprocessor directives and imports.
- Shader
Cache - A cache for shaders and shader imports, with asset state-tracking for waiting to load shaders until all imports are resolved.
- Shader
Id - Globally unique 32-bit id, guaranteed via atomics on a static global.
- Shader
Loader - The
AssetLoaderresponsible for loading unprocessed shader assets. - Shader
Settings - Settings for loading shaders.
Enums§
- Shader
Cache Error - Type of error returned by a
PipelineCachewhen the creation of a GPU pipeline object failed. - Shader
Cache Source - Fully composed source code of a shader module, with all shader defs applied.
- Shader
DefVal - A compile time shader value definition to be inlined into the shader source. Variant tuples contain the name of the definition, and the value.
- Shader
Import - A shader import, described as either an asset path or an import path.
- Shader
Loader Error - An error encountered while loading a shader’s source.
- Shader
Ref - A reference to a shader asset.
- Source
- Raw shader source code.
- Validate
Shader - Describes whether or not to perform runtime checks on shaders. Runtime checks can be enabled for safety at the cost of speed. By default no runtime checks will be performed.
Type Aliases§
- Cached
Pipeline Id - An id of a pipeline, typically in the
PipelineCacheTypically corresponds to a unique combination ofShaderandShaderDefVals.