pub struct Shape;Expand description
A shader for handling matrix/vector indexing based on their shape of type
wgcore::shapes::ViewShape.
Trait Implementations§
Source§impl Shader for Shape
impl Shader for Shape
Source§fn from_device(device: &Device) -> Result<Self, ComposerError>
fn from_device(device: &Device) -> Result<Self, ComposerError>
Source§fn naga_module() -> Result<Module, ComposerError>
fn naga_module() -> Result<Module, ComposerError>
The naga module built from this shader.
Source§fn absolute_path() -> Option<PathBuf>
fn absolute_path() -> Option<PathBuf>
The absolute path of this wgsl shader source file. Read more
Source§fn compose(composer: &mut Composer) -> Result<(), ComposerError>
fn compose(composer: &mut Composer) -> Result<(), ComposerError>
Add to
composer the composable module definition of Self (if there are any) and all its
shader dependencies .Source§fn watch_sources(state: &mut HotReloadState) -> Result<()>
fn watch_sources(state: &mut HotReloadState) -> Result<()>
Registers all the source files, for
Self and all its shader dependencies, for change
detection.Source§fn needs_reload(state: &HotReloadState) -> bool
fn needs_reload(state: &HotReloadState) -> bool
Checks if this shader (or any of its dependencies) need to be reloaded due to a change
from disk.
Source§fn flat_wgsl() -> Result<String, ComposerError>
fn flat_wgsl() -> Result<String, ComposerError>
This shader’s WGSL sources as a single file (after dependency and macro resolution).
Source§fn composer() -> Result<Composer, ComposerError>
fn composer() -> Result<Composer, ComposerError>
A composer filled with the module definition of
Self (if there is any) and all its
shader dependencies.Source§fn set_absolute_path(path: PathBuf)
fn set_absolute_path(path: PathBuf)
Registers in the global
ShaderRegistry known absolute path for this shader. Read moreSource§fn reload_if_changed(
&mut self,
device: &Device,
state: &HotReloadState,
) -> Result<bool, ComposerError>
fn reload_if_changed( &mut self, device: &Device, state: &HotReloadState, ) -> Result<bool, ComposerError>
Reloads this shader if it on any of its dependencies have been changed from disk.
Auto Trait Implementations§
impl Freeze for Shape
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnsafeUnpin for Shape
impl UnwindSafe for Shape
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, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.