[]Struct rendy::resource::SamplerDesc

pub struct SamplerDesc {
    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 normalized: bool,
    pub anisotropic: Anisotropic,
}

Specifies how to sample from an image. These are all the parameters available that alter how the GPU goes from a coordinate in an image to producing an actual value from the texture, including filtering/ scaling, wrap mode, etc.

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.

normalized: bool

Specifies whether the texture coordinates are normalized.

anisotropic: Anisotropic

Anisotropic filtering.

Methods

impl SamplerDesc

pub fn new(filter: Filter, wrap: WrapMode) -> SamplerDesc

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

Trait Implementations

impl StructuralEq for SamplerDesc

impl PartialEq<SamplerDesc> for SamplerDesc

impl Eq for SamplerDesc

impl Debug for SamplerDesc

impl Hash for SamplerDesc

impl Clone for SamplerDesc

impl StructuralPartialEq for SamplerDesc

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]