Module librashader::presets

source ·
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


  • Shader preset wildcard replacement context handling.