Skip to content

texture.create2D#samplerDesc

Summary

texture.create2D#samplerDesc exposes the sampler settings resolved when the texture wrapper was constructed. Read it when inspecting filtering and address modes or creating a compatible sampler for a custom pass.

Syntax

readonly Texture2D.samplerDesc: GPUSamplerDescriptor
const descriptor = texture.samplerDesc;

Returns

GPUSamplerDescriptor - The stored descriptor. The default address mode is "repeat" on each axis, and the minification, magnification and mipmap filters default to "linear". The default LOD range is [0, 32].

Notes

Treat the descriptor as read-only. The wrapper creates and caches a sampler when it is first needed. Supply filtering or wrapping overrides in the factory descriptor when constructing a texture.

See Also