Enum vulkano::sampler::SamplerAddressMode [−][src]
pub enum SamplerAddressMode { Repeat, MirroredRepeat, ClampToEdge, ClampToBorder(BorderColor), MirrorClampToEdge, }
Expand description
How the sampler should behave when it needs to access a pixel that is out of range of the texture.
Variants
Repeat the texture. In other words, the pixel at coordinate x + 1.0
is the same as the
one at coordinate x
.
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
.
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.
Similar to MirroredRepeat
, except that coordinates are clamped to the range
[-1.0, 1.0]
.
Trait Implementations
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for SamplerAddressMode
impl Send for SamplerAddressMode
impl Sync for SamplerAddressMode
impl Unpin for SamplerAddressMode
impl UnwindSafe for SamplerAddressMode
Blanket Implementations
Mutably borrows from an owned value. Read more
Builds a pointer to this type from a raw pointer.
Returns true if the size is suitable to store a type like this.
Returns the size of an individual element.