TEXTURE SAMPLERS

Texture sampler

constexpr sampler s (filter::linear);

A type that allows to specify how a texture is supposed to be sampled. An object of this type can be instanziated inside a shader function and customized to the specific requirments setting the respective values of the state enumerations. All state enumerations have default values that are set automatically if no value is provided.

constexpr sampler s (filter::linear,
                     mip_filter::linear,
                     coord::pixel,
                     address::repeat,
                     border_color::opaque_black,
                     compare_func::equal);

Filter sampler state enumeration

constexpr sampler s (filter::linear);

An enumeration type that allows to specify the minification and magnification filter modes used for texture sampling. The available modes are nearest (default) and linear. If no filter value is provided when initializing a sampler the default value is used.

Minification filter sampler state enumeration

constexpr sampler s (mag_filter::linear);

An enumeration type that allows to specify the minification filter mode used for texture sampling. The available modes are nearest (default) and linear. If no filter value is provided when initializing a sampler the default value is used.

Magnification filter sampler state enumeration

constexpr sampler s (min_filter::linear);

An enumeration type that allows to specify the magnification filter mode used for texture sampling. The available modes are nearest (default) and linear. If no filter value is provided when initializing a sampler the default value is used.

Mipmap filter sampler state enumeration

constexpr sampler s (mip_filter::linear);

An enumeration type that allows to specify the mipmap filter mode used for texture sampling. The available modes are none (default), i.e. only one level of detail is used, nearest and linear. If no filter value is provided when initializing a sampler the default value is used.

Filter value none

constexpr sampler s (mip_filter::none);

The default value of the sampler state enumeration mip_filter.

Filter value nearest

constexpr sampler s (filter::nearest);

A value of the sampler state enumerations filter, min_filter, max_filter and mip_filter. It is the default value of filter, min_filter, max_filter.

Filter value linear

constexpr sampler s (filter::linear);

A value of the sampler state enumerations filter, min_filter and max_filter.

Coordinate sampler state enumeration

constexpr sampler s (coord::pixel);

An enumeration type that allows to specify the coordinate mode used for texture sampling. The available modes are normalized (default) and pixel coordinates. If no coordinate value is provided when initializing a sampler the default value is used.

Coordinate value normalized

constexpr sampler s (coord::normalized);

The default value of the sampler state enumeration coord.

Coordinate value pixel

constexpr sampler s (coord::pixel);

A value of the sampler state enumeration coord.

Address sampler state enumeration

constexpr sampler s (address::repeat);

An enumeration type that allows to specify the texture coordinate addressing mode used for texture sampling. The available modes are clamp_to_edge (default), clamp_to_zero, clamp_to_border, repeat and mirror_repeat. If no address value is provided when initializing a sampler the default value is used.

Address sampler state enumeration (s-coordinate)

constexpr sampler s (s_address::repeat);

An enumeration type that allows to specify the texture coordinate addressing mode of the s-coordinate used for texture sampling. The available modes are clamp_to_edge (default), clamp_to_zero, clamp_to_border, repeat and mirror_repeat. If no address value is provided when initializing a sampler the default value is used.

Address sampler state enumeration (t-coordinate)

constexpr sampler s (t_address::repeat);

An enumeration type that allows to specify the texture coordinate addressing mode of the t-coordinate used for texture sampling. The available modes are clamp_to_edge (default), clamp_to_zero, clamp_to_border, repeat and mirror_repeat. If no address value is provided when initializing a sampler the default value is used.

Address sampler state enumeration (r-coordinate)

constexpr sampler s (r_address::repeat);

An enumeration type that allows to specify the texture coordinate addressing mode of the r-coordinate used for texture sampling. The available modes are clamp_to_edge (default), clamp_to_zero, clamp_to_border, repeat and mirror_repeat. If no address value is provided when initializing a sampler the default value is used.

Address value clamp_to_edge

constexpr sampler s (address::clamp_to_edge);

The default value of the sampler state enumeration address.

Address value clamp_to_zero

constexpr sampler s (address::clamp_to_zero);

A value of the sampler state enumeration address.

Address value clamp_to_border

constexpr sampler s (address::clamp_to_border);

A value of the sampler state enumeration address.

Address value repeat

constexpr sampler s (address::repeat);

A value of the sampler state enumeration address.

Address value mirrored_repeat

constexpr sampler s (address::mirrored_repeat);

A value of the sampler state enumeration address.

Border color sampler state enumeration

constexpr sampler s (border_color::opaque_black);

An enumeration type that allows to specify the border color mode used for texture sampling. The available modes are transparent_black (default), opaque_black and opaque_white. If no border color value is provided when initializing a sampler the default value is used.

Border color value transparent_black

constexpr sampler s (address::transparent_black);

The default value of the sampler state enumeration border color.

Border color value opaque_black

constexpr sampler s (address::opaque_black);

A value of the sampler state enumeration border color.

Border color value opaque_white

constexpr sampler s (address::opaque_white);

A value of the sampler state enumeration border color.

Compare function sampler state enumeration

constexpr sampler s (compare_func::equal);

An enumeration type that allows to specify the compare function mode used for texture sampling. The specified comparision test is used by the sample_compare and gather_compare functions. The available modes are never (default), less, less_equal, greater, greater_equal, equal, not_equal and always. If no compare function value is provided when initializing a sampler the default value is used.

Compare function value never

constexpr sampler s (compare_func::never);

The default value of the sampler state enumeration border color.

Compare function value less

constexpr sampler s (compare_func::less);

A value of the sampler state enumeration border color.

Compare function value less than or equal

constexpr sampler s (compare_func::less_equal);

A value of the sampler state enumeration border color.

Compare function value greater

constexpr sampler s (compare_func::greater);

A value of the sampler state enumeration border color.

Compare function value greater than or equal

constexpr sampler s (compare_func::greater_equal);

A value of the sampler state enumeration border color.

Compare function value equal

constexpr sampler s (compare_func::equal);

A value of the sampler state enumeration border color.

Compare function value not equal

constexpr sampler s (compare_func::not_equal);

A value of the sampler state enumeration border color.

Compare function value always

constexpr sampler s (compare_func::always);

A value of the sampler state enumeration border color.