pub enum SamplerKind {
Sampler1D,
Sampler2D,
Sampler3D,
SamplerCube,
USampler1D,
USampler2D,
USampler3D,
USamplerCube,
}Expand description
A sampler represents how the data of a texture is accessed, and different kinds of samplers are intended for different kinds of textures.
Variants§
Sampler1D
A sampler for a 1D linear texture, a series of values that are indexed by a single coordinate and where each component of the value is a float.
Sampler2D
A sampler for the usual 2D image texture, a flat area of values that are indexed by a pair of coordinates (x, y) and where each component of the value is a float.
Sampler3D
A sampler for a 3D texture, a volume of values that are indexed by three coordinates (x, y, z) and where each component of the value is a float.
SamplerCube
A sampler for six square 2D images where each image represents one face of a cube. It is indexed by a three coordinate direction from the center of the cube (x, y, z) where the magnitude of the coordinates do not matter. The sampler follows the direction of the coordinates until it finds a place on one of the six faces of the cube. Each component of the resulting value is a float.
USampler1D
A sampler for a 1D linear texture, a series of values that are indexed by a single coordinate and where each component of the value is an unsigned integer.
USampler2D
A sampler for the usual 2D image texture, a flat area of values that are indexed by a pair of coordinates (x, y) and where each component of the value is an unsigned integer.
USampler3D
A sampler for a 3D texture, a volume of values that are indexed by three coordinates (x, y, z) and where each component of the value is an unsigned integer.
USamplerCube
A sampler for six square 2D images where each image represents one face of a cube. It is indexed by a three coordinate direction from the center of the cube (x, y, z) where the magnitude of the coordinates do not matter. The sampler follows the direction of the coordinates until it finds a place on one of the six faces of the cube. Each component of the resulting value is an unsigned integer.
Trait Implementations§
Source§impl AsRef<str> for SamplerKind
impl AsRef<str> for SamplerKind
Source§impl Clone for SamplerKind
impl Clone for SamplerKind
Source§fn clone(&self) -> SamplerKind
fn clone(&self) -> SamplerKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SamplerKind
impl Debug for SamplerKind
Source§impl Default for SamplerKind
impl Default for SamplerKind
Source§fn default() -> SamplerKind
fn default() -> SamplerKind
Source§impl<'de> Deserialize<'de> for SamplerKind
impl<'de> Deserialize<'de> for SamplerKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl FromStr for SamplerKind
impl FromStr for SamplerKind
Source§impl PartialEq for SamplerKind
impl PartialEq for SamplerKind
Source§impl Reflect for SamplerKindwhere
Self: 'static,
impl Reflect for SamplerKindwhere
Self: 'static,
fn source_path() -> &'static str
fn try_clone_box(&self) -> Option<Box<dyn Reflect>>
fn type_name(&self) -> &'static str
fn derived_types() -> &'static [TypeId]
fn query_derived_types(&self) -> &'static [TypeId]
fn doc(&self) -> &'static str
Source§fn assembly_name(&self) -> &'static str
fn assembly_name(&self) -> &'static str
#[derive(Reflect)]) to ensure that this method will return correct assembly
name. In other words - there’s no guarantee, that any implementation other than proc-macro
will return a correct name of the assembly. Alternatively, you can use env!("CARGO_PKG_NAME")
as an implementation.Source§fn type_assembly_name() -> &'static str
fn type_assembly_name() -> &'static str
#[derive(Reflect)]) to ensure that this method will return correct assembly
name. In other words - there’s no guarantee, that any implementation other than proc-macro
will return a correct name of the assembly. Alternatively, you can use env!("CARGO_PKG_NAME")
as an implementation.fn fields_ref(&self, func: &mut dyn FnMut(&[FieldRef<'_, '_>]))
fn fields_mut(&mut self, func: &mut dyn FnMut(&mut [FieldMut<'_, '_>]))
fn into_any(self: Box<Self>) -> Box<dyn Any>
fn set( &mut self, value: Box<dyn Reflect>, ) -> Result<Box<dyn Reflect>, Box<dyn Reflect>>
fn as_any(&self, func: &mut dyn FnMut(&dyn Any))
fn as_any_mut(&mut self, func: &mut dyn FnMut(&mut dyn Any))
fn as_reflect(&self, func: &mut dyn FnMut(&dyn Reflect))
fn as_reflect_mut(&mut self, func: &mut dyn FnMut(&mut dyn Reflect))
Source§fn set_field(
&mut self,
field_name: &str,
value: Box<dyn Reflect>,
func: &mut dyn FnMut(Result<Box<dyn Reflect>, SetFieldError>),
)
fn set_field( &mut self, field_name: &str, value: Box<dyn Reflect>, func: &mut dyn FnMut(Result<Box<dyn Reflect>, SetFieldError>), )
#[reflect(setter = ..)] or falls back to
Reflect::field_mutfn field( &self, name: &str, func: &mut dyn FnMut(Option<&(dyn Reflect + 'static)>), )
fn field_mut( &mut self, name: &str, func: &mut dyn FnMut(Option<&mut (dyn Reflect + 'static)>), )
fn as_array(&self, func: &mut dyn FnMut(Option<&(dyn ReflectArray + 'static)>))
fn as_array_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectArray + 'static)>), )
fn as_list(&self, func: &mut dyn FnMut(Option<&(dyn ReflectList + 'static)>))
fn as_list_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectList + 'static)>), )
fn as_inheritable_variable( &self, func: &mut dyn FnMut(Option<&(dyn ReflectInheritableVariable + 'static)>), )
fn as_inheritable_variable_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectInheritableVariable + 'static)>), )
fn as_hash_map( &self, func: &mut dyn FnMut(Option<&(dyn ReflectHashMap + 'static)>), )
fn as_hash_map_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectHashMap + 'static)>), )
fn as_handle( &self, func: &mut dyn FnMut(Option<&(dyn ReflectHandle + 'static)>), )
fn as_handle_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectHandle + 'static)>), )
Source§impl Serialize for SamplerKind
impl Serialize for SamplerKind
Source§impl TryFrom<&str> for SamplerKind
impl TryFrom<&str> for SamplerKind
Source§impl TypeUuidProvider for SamplerKind
impl TypeUuidProvider for SamplerKind
Source§impl VariantNames for SamplerKind
impl VariantNames for SamplerKind
Source§impl Visit for SamplerKind
impl Visit for SamplerKind
Source§fn visit(&mut self, name: &str, visitor: &mut Visitor) -> VisitResult
fn visit(&mut self, name: &str, visitor: &mut Visitor) -> VisitResult
impl Copy for SamplerKind
impl Eq for SamplerKind
impl StructuralPartialEq for SamplerKind
Auto Trait Implementations§
impl Freeze for SamplerKind
impl RefUnwindSafe for SamplerKind
impl Send for SamplerKind
impl Sync for SamplerKind
impl Unpin for SamplerKind
impl UnwindSafe for SamplerKind
Blanket Implementations§
Source§impl<T> AsyncTaskResult for T
impl<T> AsyncTaskResult for T
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> FieldValue for Twhere
T: Reflect,
impl<T> FieldValue for Twhere
T: Reflect,
Source§fn field_value_as_any_ref(&self) -> &(dyn Any + 'static)
fn field_value_as_any_ref(&self) -> &(dyn Any + 'static)
self to a &dyn AnySource§fn field_value_as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn field_value_as_any_mut(&mut self) -> &mut (dyn Any + 'static)
self to a &mut dyn Anyfn field_value_as_reflect(&self) -> &(dyn Reflect + 'static)
fn field_value_as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)
fn type_name(&self) -> &'static str
Source§impl<T, U> ObjectOrVariant<T> for Uwhere
PhantomData<U>: ObjectOrVariantHelper<T, U>,
impl<T, U> ObjectOrVariant<T> for Uwhere
PhantomData<U>: ObjectOrVariantHelper<T, U>,
Source§impl<T> ReflectBase for Twhere
T: Reflect,
impl<T> ReflectBase for Twhere
T: Reflect,
fn as_any_raw(&self) -> &(dyn Any + 'static)
fn as_any_raw_mut(&mut self) -> &mut (dyn Any + 'static)
Source§impl<T> ResolvePath for Twhere
T: Reflect,
impl<T> ResolvePath for Twhere
T: Reflect,
fn resolve_path<'p>( &self, path: &'p str, func: &mut dyn FnMut(Result<&(dyn Reflect + 'static), ReflectPathError<'p>>), )
fn resolve_path_mut<'p>( &mut self, path: &'p str, func: &mut dyn FnMut(Result<&mut (dyn Reflect + 'static), ReflectPathError<'p>>), )
fn get_resolve_path<'p, T>(
&self,
path: &'p str,
func: &mut dyn FnMut(Result<&T, ReflectPathError<'p>>),
)where
T: Reflect,
fn get_resolve_path_mut<'p, T>(
&mut self,
path: &'p str,
func: &mut dyn FnMut(Result<&mut T, ReflectPathError<'p>>),
)where
T: Reflect,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.