TextureSampler
TextureSampler defines how a texture is accessed during rendering.
It specifies filtering modes, wrapping modes, and optional comparison modes for texture sampling. MaterialInstance copies it when binding a texture, so later changes don't affect bound textures.
Constructors
Creates a TextureSampler with the default parameters: NEAREST filtering, CLAMP_TO_EDGE on all axes, anisotropy 1, no comparison.
Creates a TextureSampler with the same minification and magnification filter and one wrap mode for all axes.
Creates a TextureSampler with separate minification and magnification filters, and a wrap mode applied to all axes.
Creates a TextureSampler with separate filters and wrap modes for each axis.
Creates a TextureSampler with default filtering and wrapping, and the given comparison mode.
Types
Comparison function for depth and stencil tests, and for COMPARE_TO_TEXTURE sampling.
Compare mode for shadow map sampling and similar depth comparisons.
Magnification filter specifies how texels are filtered when the texture is sampled at a size larger than its original resolution.
Minification filter specifies how texels are filtered when the texture is sampled at a size smaller than its original resolution.
Texture wrapping mode for texture coordinates outside the 0..1 range.
Properties
Anisotropic filtering amount. Should be a power-of-two. Default is 1.0 (disabled). The maximum permissible value is 128.
Comparison function for depth comparisons.
Comparison mode.
Magnification filter.
Minification filter.
Wrap mode for R (depth) texture coordinate.
Wrap mode for S (horizontal) texture coordinate.
Wrap mode for T (vertical) texture coordinate.
Functions
Sets the comparison mode and function.