Enum components::platform::core::MaterialFilter
source · [−]#[non_exhaustive]
pub enum MaterialFilter {
Nearest,
Linear,
NearestMipmapNearest,
LinearMipmapNearest,
NearestMipmapLinear,
LinearMipmapLinear,
}
Expand description
Material texture filtering.
Texture filtering is used whenever the current pixel maps either to more than one texture element (texel) or less than one. These filter enums correspond to different strategies used to come up with a pixel color, by possibly referring to multiple neighbouring texels and taking a weighted average or simply using the nearest texel.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Nearest
Measuring in manhatten distance from the, current pixel center, use the nearest texture texel
Linear
Use the weighted average of the 4 texels nearest the current pixel center
NearestMipmapNearest
Select the mimap level whose
texel size most closely matches the current pixel, and use the
MaterialFilter::Nearest
criterion
LinearMipmapNearest
Select the mimap level whose
texel size most closely matches the current pixel, and use the
MaterialFilter::Linear
criterion
NearestMipmapLinear
Select the two mimap levels
whose texel size most closely matches the current pixel, use
the MaterialFilter::Nearest
criterion on each one and take
their weighted average
LinearMipmapLinear
Select the two mimap levels
whose texel size most closely matches the current pixel, use
the MaterialFilter::Linear
criterion on each one and take
their weighted average
Trait Implementations
sourceimpl Clone for MaterialFilter
impl Clone for MaterialFilter
sourcefn clone(&self) -> MaterialFilter
fn clone(&self) -> MaterialFilter
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MaterialFilter
impl Debug for MaterialFilter
sourceimpl Display for MaterialFilter
impl Display for MaterialFilter
sourceimpl Hash for MaterialFilter
impl Hash for MaterialFilter
sourceimpl Ord for MaterialFilter
impl Ord for MaterialFilter
sourceimpl PartialEq<MaterialFilter> for MaterialFilter
impl PartialEq<MaterialFilter> for MaterialFilter
sourceimpl PartialOrd<MaterialFilter> for MaterialFilter
impl PartialOrd<MaterialFilter> for MaterialFilter
sourcefn partial_cmp(&self, other: &MaterialFilter) -> Option<Ordering>
fn partial_cmp(&self, other: &MaterialFilter) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for MaterialFilter
impl Eq for MaterialFilter
impl StructuralEq for MaterialFilter
impl StructuralPartialEq for MaterialFilter
Auto Trait Implementations
impl RefUnwindSafe for MaterialFilter
impl Send for MaterialFilter
impl Sync for MaterialFilter
impl Unpin for MaterialFilter
impl UnwindSafe for MaterialFilter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Clamp<T> for T where
T: PartialOrd<T>,
impl<T> Clamp<T> for T where
T: PartialOrd<T>,
fn clamped(self, min: T, max: T) -> T
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
fn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.