#[non_exhaustive]pub enum MaterialFilter {
Nearest,
Linear,
NearestMipmapNearest,
LinearMipmapNearest,
NearestMipmapLinear,
LinearMipmapLinear,
}
Expand description
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§
Source§impl Clone for MaterialFilter
impl Clone for MaterialFilter
Source§fn clone(&self) -> MaterialFilter
fn clone(&self) -> MaterialFilter
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MaterialFilter
impl Debug for MaterialFilter
Source§impl Display for MaterialFilter
impl Display for MaterialFilter
Source§impl<'a> FromValue<'a> for MaterialFilter
impl<'a> FromValue<'a> for MaterialFilter
Source§unsafe fn from_value(value: &Value) -> Self
unsafe fn from_value(value: &Value) -> Self
Source§impl<'a> FromValueOptional<'a> for MaterialFilter
impl<'a> FromValueOptional<'a> for MaterialFilter
Source§impl Hash for MaterialFilter
impl Hash for MaterialFilter
Source§impl Ord for MaterialFilter
impl Ord for MaterialFilter
Source§fn cmp(&self, other: &MaterialFilter) -> Ordering
fn cmp(&self, other: &MaterialFilter) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for MaterialFilter
impl PartialEq for MaterialFilter
Source§impl PartialOrd for MaterialFilter
impl PartialOrd for MaterialFilter
Source§impl SetValue for MaterialFilter
impl SetValue for MaterialFilter
Source§impl StaticType for MaterialFilter
impl StaticType for MaterialFilter
Source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Copy for MaterialFilter
impl Eq for MaterialFilter
impl StructuralPartialEq for MaterialFilter
Auto Trait Implementations§
impl Freeze for MaterialFilter
impl RefUnwindSafe for MaterialFilter
impl Send for MaterialFilter
impl Sync for MaterialFilter
impl Unpin for MaterialFilter
impl UnwindSafe for MaterialFilter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
Source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.