2009-12-20 19:41:50 -08:00
|
|
|
.. _sampler:
|
|
|
|
|
2009-12-20 15:00:40 -08:00
|
|
|
Sampler
|
|
|
|
=======
|
|
|
|
|
|
|
|
Texture units have many options for selecting texels from loaded textures;
|
|
|
|
this state controls an individual texture unit's texel-sampling settings.
|
|
|
|
|
2009-12-20 16:40:39 -08:00
|
|
|
Texture coordinates are always treated as four-dimensional, and referred to
|
|
|
|
with the traditional (S, T, R, Q) notation.
|
|
|
|
|
2009-12-20 15:00:40 -08:00
|
|
|
Members
|
|
|
|
-------
|
|
|
|
|
2009-12-20 16:40:39 -08:00
|
|
|
wrap_s
|
|
|
|
How to wrap the S coordinate. One of PIPE_TEX_WRAP.
|
|
|
|
wrap_t
|
|
|
|
How to wrap the T coordinate. One of PIPE_TEX_WRAP.
|
|
|
|
wrap_r
|
|
|
|
How to wrap the R coordinate. One of PIPE_TEX_WRAP.
|
|
|
|
min_img_filter
|
|
|
|
The filter to use when minifying texels. One of PIPE_TEX_FILTER.
|
|
|
|
min_mip_filter
|
|
|
|
The filter to use when minifying mipmapped textures. One of
|
|
|
|
PIPE_TEX_FILTER.
|
|
|
|
mag_img_filter
|
|
|
|
The filter to use when magnifying texels. One of PIPE_TEX_FILTER.
|
2010-01-21 20:22:24 +01:00
|
|
|
compare_mode
|
|
|
|
If set to PIPE_TEX_COMPARE_R_TO_TEXTURE, texture output is computed
|
|
|
|
according to compare_func, using r coord and the texture value as operands.
|
|
|
|
If set to PIPE_TEX_COMPARE_NONE, no comparison calculation is performed.
|
|
|
|
compare_func
|
|
|
|
How the comparison is computed. One of PIPE_FUNC.
|
2009-12-20 16:40:39 -08:00
|
|
|
normalized_coords
|
|
|
|
Whether the texture coordinates are normalized. If normalized, they will
|
|
|
|
always be in [0, 1]. If not, they will be in the range of each dimension
|
|
|
|
of the loaded texture.
|
|
|
|
lod_bias
|
|
|
|
The bias to apply to the level of detail.
|
|
|
|
min_lod
|
|
|
|
Minimum level of detail, used to clamp LoD after bias.
|
|
|
|
max_lod
|
|
|
|
Maximum level of detail, used to clamp LoD after bias.
|
|
|
|
border_color
|
|
|
|
RGBA color used for out-of-bounds coordinates.
|
|
|
|
max_anisotropy
|
|
|
|
Maximum filtering to apply anisotropically to textures. Setting this to
|
2010-02-12 00:43:38 +01:00
|
|
|
0 disables anisotropic filtering. Any other setting enables anisotropic
|
|
|
|
filtering, however it's not unexpected some drivers only will change their
|
|
|
|
filtering with a setting of 2 and higher.
|