texture-parameters


Vocabulary
gpu.textures

Class description
A texture-parameters tuple is supplied when constructing a texture to control the wrapping, filtering, and level-of-detail handling of the texture. These tuples have the following slots:
The wrap slot determines how texture coordinates outside the 0.0 to 1.0 range are mapped to the texture image. The slot either contains a single texture-wrap value, which will apply to all three axes, or a sequence of up to three values, which will apply to the S, T, and R axes, respectively.
The min-filter and min-mipmap-filter determine how the texture image is filtered when sampled below its highest level of detail, the former filtering between pixels within a level of detail and the latter filtering between levels of detail. A setting of filter-linear uses linear, bilinear, or trilinear filtering among the sampled pixels, while a setting of filter-nearest uses nearest-neighbor sampling. The min-mipmap-filter slot may additionally be set to f to disable mipmapping and only sample the highest level of detail.
The mag-filter analogously determines how the texture image is filtered when sampled above its highest level of detail.
The min-lod and max-lod slots contain integer values that will clamp the range of levels of detail that will be sampled from the texture.
The lod-bias slot contains an integer value that will offset the levels of detail that would normally be sampled from the texture.
The base-level slot contains an integer value that identifies the highest level of detail for the image, typically zero.
The max-level slot contains an integer value that identifies the lowest level of detail for the image. This value will automatically be clamped to the maximum of the base-2 logarithms of the dimensions of the highest level of detail image.


See also
set-texture-parameters

Definition