Available on crate feature
presets only.Expand description
Parsing and usage of shader presets.
This module contains facilities and types for parsing .slangp shader presets files.
Shader presets contain shader and texture parameters, and the order in which to apply a set of
shaders in a filter chain. A librashader runtime takes a resulting ShaderPreset
as input to create a filter chain.
librashader’s preset parser has been tested against all presets in the slang-shaders repository
to generally good compatibility. However, the preset parser requires all referenced paths to resolve to a canonical, existing path relative
to the preset file. The handful of shaders that fail to parse due to this or other reasons are
listed at BROKEN_SHADERS.md.
Modules§
- context
- Shader preset wildcard replacement context handling.
Structs§
- Loaded
Resource - A resource for a shader preset, fully loaded into memory.
- Parameter
Meta - Configuration options for a shader parameter.
- Pass
Meta - Meta information about a shader pass.
- Path
Reference - A reference to a resource on disk.
- Scale2D
- 2D quad scaling parameters.
- Scaling
- Framebuffer scaling parameters.
- Shader
Features - Enable feature flags for shaders.
- Shader
Preset - A shader preset including all specified parameters, textures, and paths to specified shaders.
- Shader
Preset Pack - A fully loaded-in-memory shader preset, with all paths resolved to data.
- Texture
Buffer - A buffer holding RGBA image bytes.
- Texture
Meta - Configuration options for a lookup texture used in the shader.
- Wildcard
Context - A preset wildcard context.
Enums§
- Parse
Error Kind - The kind of error that may occur in parsing.
- Parse
Preset Error - Error type for preset parsing.
- Scale
Factor - The scaling factor for framebuffer scaling.
- Scale
Type - The scaling type for the shader pass.
- Shader
Source Language - The language that the shader sources are in.
Traits§
- Loadable
Resource - Trait for a resource that is loadable from disk.
- Preset
Color Space - Query the output color space of a shader preset.
Functions§
- get_
parameter_ meta - Get full parameter metadata from a shader preset.
Type Aliases§
- Pass
Config - The configuration for a single shader pass.
- Pass
Resource - The loaded resource information for the source code of a shader pass.
- Texture
Config - Configuration options for a lookup texture used in the shader.
- Texture
Resource - The loaded texture resource for a shader preset.