Struct gfx_hal::image::SamplerInfo

source ·
pub struct SamplerInfo {
    pub min_filter: Filter,
    pub mag_filter: Filter,
    pub mip_filter: Filter,
    pub wrap_mode: (WrapMode, WrapMode, WrapMode),
    pub lod_bias: Lod,
    pub lod_range: Range<Lod>,
    pub comparison: Option<Comparison>,
    pub border: PackedColor,
    pub anisotropic: Anisotropic,
}
Expand description

Specifies how to sample from an image.

Fields

min_filter: Filter

Minification filter method to use.

mag_filter: Filter

Magnification filter method to use.

mip_filter: Filter

Mip filter method to use.

wrap_mode: (WrapMode, WrapMode, WrapMode)

Wrapping mode for each of the U, V, and W axis (S, T, and R in OpenGL speak).

lod_bias: Lod

This bias is added to every computed mipmap level (N + lod_bias). For example, if it would select mipmap level 2 and lod_bias is 1, it will use mipmap level 3.

lod_range: Range<Lod>

This range is used to clamp LOD level used for sampling.

comparison: Option<Comparison>

Comparison mode, used primary for a shadow map.

border: PackedColor

Border color is used when one of the wrap modes is set to border.

anisotropic: Anisotropic

Anisotropic filtering.

Implementations

Create a new sampler description with a given filter method for all filtering operations and a wrapping mode, using no LOD modifications.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.