Skip to main content

Crate bevy_shader

Crate bevy_shader 

Source
Expand description

Provides Shader assets for Bevy.

Modules§

prelude
The shader prelude.

Macros§

load_shader_library
Inline shader as an embedded_asset and load it permanently.

Structs§

Shader
An “unprocessed” shader. It can contain preprocessor directives and imports.
ShaderCache
A cache for shaders and shader imports, with asset state-tracking for waiting to load shaders until all imports are resolved.
ShaderId
Globally unique 32-bit id, guaranteed via atomics on a static global.
ShaderLoader
The AssetLoader responsible for loading unprocessed shader assets.
ShaderSettings
Settings for loading shaders.

Enums§

ShaderCacheError
Type of error returned by a PipelineCache when the creation of a GPU pipeline object failed.
ShaderCacheSource
Fully composed source code of a shader module, with all shader defs applied.
ShaderDefVal
A compile time shader value definition to be inlined into the shader source. Variant tuples contain the name of the definition, and the value.
ShaderImport
A shader import, described as either an asset path or an import path.
ShaderLoaderError
An error encountered while loading a shader’s source.
ShaderRef
A reference to a shader asset.
Source
Raw shader source code.
ValidateShader
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§

CachedPipelineId
An id of a pipeline, typically in the PipelineCache Typically corresponds to a unique combination of Shader and ShaderDefVals.