Enum vulkano::sampler::SamplerAddressMode
[−]
[src]
pub enum SamplerAddressMode { Repeat, MirroredRepeat, ClampToEdge, ClampToBorder(BorderColor), MirrorClampToEdge, }
How the sampler should behave when it needs to access a pixel that is out of range of the texture.
Variants
Repeat
Repeat the texture. In other words, the pixel at coordinate x + 1.0
is the same as the
one at coordinate x
.
MirroredRepeat
Repeat the texture but mirror it at every repetition. In other words, the pixel at
coordinate x + 1.0
is the same as the one at coordinate 1.0 - x
.
ClampToEdge
The coordinates are clamped to the valid range. Coordinates below 0.0 have the same value as coordinate 0.0. Coordinates over 1.0 have the same value as coordinate 1.0.
ClampToBorder(BorderColor)
Any pixel out of range is considered to be part of the "border" of the image, which has a specific color of your choice.
Note that if you use ClampToBorder
multiple times, they must all have the same border
color.
MirrorClampToEdge
Similar to MirroredRepeat
, except that coordinates are clamped to the range
[-1.0, 1.0]
.
Trait Implementations
impl Debug for SamplerAddressMode
[src]
impl Copy for SamplerAddressMode
[src]
impl Clone for SamplerAddressMode
[src]
fn clone(&self) -> SamplerAddressMode
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for SamplerAddressMode
[src]
fn eq(&self, __arg_0: &SamplerAddressMode) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &SamplerAddressMode) -> bool
This method tests for !=
.
impl Eq for SamplerAddressMode
[src]
impl Hash for SamplerAddressMode
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.