Struct librashader::presets::ShaderPreset
source · pub struct ShaderPreset {
pub shader_count: i32,
pub shaders: Vec<ShaderPassConfig>,
pub textures: Vec<TextureConfig>,
pub parameters: Vec<ParameterConfig>,
}
presets
only.Expand description
A shader preset including all specified parameters, textures, and paths to specified shaders.
A shader preset can be used to create a filter chain runtime instance, or reflected to get parameter metadata.
Fields§
§shader_count: i32
The number of shaders enabled in the filter chain.
shaders: Vec<ShaderPassConfig>
Preset information for each shader.
textures: Vec<TextureConfig>
Preset information for each texture.
parameters: Vec<ParameterConfig>
Preset information for each user parameter.
Implementations§
source§impl ShaderPreset
impl ShaderPreset
sourcepub fn try_parse(
path: impl AsRef<Path>
) -> Result<ShaderPreset, ParsePresetError>
pub fn try_parse( path: impl AsRef<Path> ) -> Result<ShaderPreset, ParsePresetError>
Try to parse the shader preset at the given path.
This will add path defaults to the wildcard resolution context.
sourcepub fn try_parse_with_driver_context(
path: impl AsRef<Path>,
driver: VideoDriver
) -> Result<ShaderPreset, ParsePresetError>
pub fn try_parse_with_driver_context( path: impl AsRef<Path>, driver: VideoDriver ) -> Result<ShaderPreset, ParsePresetError>
Try to parse the shader preset at the given path.
This will add path and driver defaults to the wildcard resolution context.
sourcepub fn try_parse_with_context(
path: impl AsRef<Path>,
context: WildcardContext
) -> Result<ShaderPreset, ParsePresetError>
pub fn try_parse_with_context( path: impl AsRef<Path>, context: WildcardContext ) -> Result<ShaderPreset, ParsePresetError>
Try to parse the shader preset at the given path, with the exact provided context.
This function does not change any of the values in the provided context, except calculating VID-FINAL-ROT
if CORE-REQ-ROT
and VID-USER-ROT
is present.
Trait Implementations§
source§impl Clone for ShaderPreset
impl Clone for ShaderPreset
source§fn clone(&self) -> ShaderPreset
fn clone(&self) -> ShaderPreset
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more