pub struct ShaderPresetPack {
pub language: ShaderSourceLanguage,
pub pass_count: i32,
pub passes: Vec<PassResource>,
pub textures: Vec<TextureResource>,
pub parameters: Vec<ParameterMeta>,
}Expand description
A fully loaded-in-memory shader preset, with all paths resolved to data.
Fields§
§language: ShaderSourceLanguageThe language that the pass shader sources are in.
Almost always GLSL, unless created from a .wgsl.slangpkg
pass_count: i32The number of shaders enabled in the filter chain.
passes: Vec<PassResource>Preset information for each shader.
textures: Vec<TextureResource>Preset information for each texture.
parameters: Vec<ParameterMeta>Preset information for each user parameter.
Implementations§
Source§impl ShaderPresetPack
impl ShaderPresetPack
Sourcepub fn load_from_preset<E>(preset: ShaderPreset) -> Result<ShaderPresetPack, E>
pub fn load_from_preset<E>(preset: ShaderPreset) -> Result<ShaderPresetPack, E>
Load a ShaderPack from a ShaderPreset.
Trait Implementations§
Source§impl Clone for ShaderPresetPack
impl Clone for ShaderPresetPack
Source§fn clone(&self) -> ShaderPresetPack
fn clone(&self) -> ShaderPresetPack
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShaderPresetPack
impl Debug for ShaderPresetPack
Source§impl PresetColorSpace for ShaderPresetPack
impl PresetColorSpace for ShaderPresetPack
Source§fn color_space(&self) -> Result<ColorSpace, PreprocessError>
fn color_space(&self) -> Result<ColorSpace, PreprocessError>
Pack-level implementation: the shader source is already loaded so this
is infallible — but we still return Result to share the trait
signature with ShaderPreset.
Auto Trait Implementations§
impl Freeze for ShaderPresetPack
impl RefUnwindSafe for ShaderPresetPack
impl Send for ShaderPresetPack
impl Sync for ShaderPresetPack
impl Unpin for ShaderPresetPack
impl UnsafeUnpin for ShaderPresetPack
impl UnwindSafe for ShaderPresetPack
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more