pub struct DepthTexture(/* private fields */);Expand description
three.js’ DepthTexture.
Implementations§
Source§impl DepthTexture
impl DepthTexture
Sourcepub fn dispose(self)
pub fn dispose(self)
depthTexture.dispose() — drops this handle, and nothing more: a texture
handle is an Rc, so the renderer frees the GPU side once every handle
is gone, at the top of the next render (docs/scene-graph.md,
“Identity and eviction”). Dropping the handle does the same; this
exists so three.js code ports line for line.
Sourcepub fn set_filters(&self, min_filter: TextureFilter, mag_filter: TextureFilter)
pub fn set_filters(&self, min_filter: TextureFilter, mag_filter: TextureFilter)
depthTexture.minFilter = depthTexture.magFilter = LinearFilter —
what ShadowNode.setupRenderTarget() sets for PCF, so that the
comparison sampler gives four bilinear-weighted comparisons per tap.
Sourcepub fn set_multisample(&self, multisample: bool)
pub fn set_multisample(&self, multisample: bool)
texture.isMultisampleRenderTargetTexture, which
RenderTarget::set_samples keeps in step with the target’s sample
count. A multisampled depth attachment is never resolved — the fog
composite reads sample 0 of it directly.
Sourcepub fn is_multisample(&self) -> bool
pub fn is_multisample(&self) -> bool
Whether this depth texture is a multisampled render-target attachment.
Sourcepub fn set_type(&self, texture_type: TextureType) -> Result<(), Error>
pub fn set_type(&self, texture_type: TextureType) -> Result<(), Error>
depthTexture.type = type. Errors rather than deferring the failure to
the pass that would have used the texture: only UnsignedIntType and
FloatType have a depth format.
Sourcepub fn texture_type(&self) -> TextureType
pub fn texture_type(&self) -> TextureType
texture.type.
Trait Implementations§
Source§impl Clone for DepthTexture
impl Clone for DepthTexture
Source§impl Debug for DepthTexture
The id is identity, not content: leaving it out keeps the Debug of a
binding description — what examples/dump_wgsl.rs prints beside the WGSL —
a function of the texture itself.
impl Debug for DepthTexture
The id is identity, not content: leaving it out keeps the Debug of a
binding description — what examples/dump_wgsl.rs prints beside the WGSL —
a function of the texture itself.