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 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.

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

impl Debug for SamplerAddressMode
[src]

Formats the value using the given formatter.

impl Copy for SamplerAddressMode
[src]

impl Clone for SamplerAddressMode
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for SamplerAddressMode
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for SamplerAddressMode
[src]

impl Hash for SamplerAddressMode
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more