pub struct ResolvedShaderConfig {
pub animation_speed: f32,
pub brightness: f32,
pub text_opacity: f32,
pub full_content: bool,
pub channel0: Option<PathBuf>,
pub channel1: Option<PathBuf>,
pub channel2: Option<PathBuf>,
pub channel3: Option<PathBuf>,
pub cubemap: Option<PathBuf>,
pub cubemap_enabled: bool,
pub use_background_as_channel0: bool,
}Expand description
Fully resolved shader configuration with all values filled in.
Created by merging user overrides, shader metadata defaults, and global defaults.
Fields§
§animation_speed: f32Animation speed multiplier
brightness: f32Brightness multiplier
text_opacity: f32Text opacity
full_content: boolFull content mode enabled
channel0: Option<PathBuf>Resolved path to iChannel0 texture
channel1: Option<PathBuf>Resolved path to iChannel1 texture
channel2: Option<PathBuf>Resolved path to iChannel2 texture
channel3: Option<PathBuf>Resolved path to iChannel3 texture
cubemap: Option<PathBuf>Resolved cubemap path prefix
cubemap_enabled: boolCubemap sampling enabled
use_background_as_channel0: boolUse the app’s background image as iChannel0
Implementations§
Source§impl ResolvedShaderConfig
impl ResolvedShaderConfig
Sourcepub fn for_shader(
shader_name: &str,
metadata: Option<&ShaderMetadata>,
config: &Config,
) -> ResolvedShaderConfig
pub fn for_shader( shader_name: &str, metadata: Option<&ShaderMetadata>, config: &Config, ) -> ResolvedShaderConfig
Resolve a shader config for a specific shader.
This is a convenience method that looks up the user override and combines it with metadata and global config.
§Arguments
shader_name- Name of the shader file (e.g., “crt.glsl”)metadata- Optional shader metadataconfig- Global config
Sourcepub fn channel_paths(&self) -> [Option<PathBuf>; 4]
pub fn channel_paths(&self) -> [Option<PathBuf>; 4]
Get channel paths as an array suitable for passing to the renderer.
Sourcepub fn cubemap_path(&self) -> Option<&PathBuf>
pub fn cubemap_path(&self) -> Option<&PathBuf>
Get the cubemap path if configured.
Trait Implementations§
Source§impl Clone for ResolvedShaderConfig
impl Clone for ResolvedShaderConfig
Source§fn clone(&self) -> ResolvedShaderConfig
fn clone(&self) -> ResolvedShaderConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 ResolvedShaderConfig
impl Debug for ResolvedShaderConfig
Source§impl Default for ResolvedShaderConfig
impl Default for ResolvedShaderConfig
Source§fn default() -> ResolvedShaderConfig
fn default() -> ResolvedShaderConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ResolvedShaderConfig
impl RefUnwindSafe for ResolvedShaderConfig
impl Send for ResolvedShaderConfig
impl Sync for ResolvedShaderConfig
impl Unpin for ResolvedShaderConfig
impl UnsafeUnpin for ResolvedShaderConfig
impl UnwindSafe for ResolvedShaderConfig
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().