Enum vulkano::sampler::SamplerAddressMode
source · 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
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
sourceimpl Clone for SamplerAddressMode
impl Clone for SamplerAddressMode
sourcefn clone(&self) -> SamplerAddressMode
fn clone(&self) -> SamplerAddressMode
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more