#[repr(u32)]pub enum TexAddress {
Wrap = 0,
Clamp = 1,
Mirror = 2,
}
Expand description
What happens when the shader asks for a texture coordinate that’s outside the texture?? Believe it or not, this happens plenty often! https://stereokit.net/Pages/StereoKit/TexAddress.html
see also Tex
Variants§
Wrap = 0
Wrap the UV coordinate around to the other side of the texture! This is basically like a looping texture, and is an excellent default. If you can see weird bits of color at the edges of your texture, this may be due to Wrap blending the color with the other side of the texture, Clamp may be better in such cases.
Clamp = 1
Clamp the UV coordinates to the edge of the texture! This’ll create color streaks that continue to forever. This is actually really great for non-looping textures that you know will always be accessed on the 0-1 range.
Mirror = 2
Like Wrap, but it reflects the image each time! Who needs this? I’m not sure!! But the graphics card can do it, so now you can too!
Trait Implementations§
Source§impl Clone for TexAddress
impl Clone for TexAddress
Source§fn clone(&self) -> TexAddress
fn clone(&self) -> TexAddress
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TexAddress
impl Debug for TexAddress
Source§impl PartialEq for TexAddress
impl PartialEq for TexAddress
impl Copy for TexAddress
impl Eq for TexAddress
impl StructuralPartialEq for TexAddress
Auto Trait Implementations§
impl Freeze for TexAddress
impl RefUnwindSafe for TexAddress
impl Send for TexAddress
impl Sync for TexAddress
impl Unpin for TexAddress
impl UnwindSafe for TexAddress
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
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>
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>
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)
&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)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.