pub struct Sampler { /* private fields */ }
Expand description
Handle to a sampler.
A Sampler
object defines how a pipeline will sample from a TextureView
. Samplers define
image filters (including anisotropy) and address (wrapping) modes, among other things. See
the documentation for SamplerDescriptor
for more information.
It can be created with Device::create_sampler
.
Corresponds to WebGPU GPUSampler
.
Implementations§
source§impl Sampler
impl Sampler
sourcepub fn global_id(&self) -> Id
Available on crate feature expose-ids
only.
pub fn global_id(&self) -> Id
expose-ids
only.Returns a globally-unique identifier for this Sampler
.
Calling this method multiple times on the same object will always return the same value.
The returned value is guaranteed to be different for all resources created from the same Instance
.