SamplerStatePreset

Description

[Flags]
enum Tinman.Engine.Rendering.SamplerStatePreset

Enumeration of commonly used sampler state blocks.

An implementation of IRenderEffect should provide helper methods for applying sampler state values based on the items of this enumeration. Those should be named as SamplerStateApply. The following presets represent the most common sampler states:

By using the preset flags separately, more specific sample state may be established:

  • Filter
    The minification, magnification and mip-mapping filter

  • Address
    The texture coordinate addressing mode, for each texture axis

  • Color
    The color of the texture border

To establish sampler state that is not covered by a state preset, please use the specific implementation of IRenderEffect, which provides access to the underlying graphics API.

Public / Constants

None

public constant None → (0:int32)

No sampler state preset.

If this preset is applied, only the texture border color will be set to zero. All other state values remain unchanged.

LinearClamp

public constant LinearClamp → (74:int32)

Shortcut for Linear and Clamp flags.

LinearWrap

public constant LinearWrap → (146:int32)

Shortcut for Linear and Wrap flags.

AnisotropicClamp

public constant AnisotropicClamp → (75:int32)

Shortcut for Anisotropic and Clamp flags.

AnisotropicWrap

public constant AnisotropicWrap → (147:int32)

Shortcut for Anisotropic and Wrap flags.

Filter

public constant Filter → (3:int32)

Bitmask for texture filtering modes.

Point

public constant Point → (1:int32)

Point filtering for minification, magnification and mip-mapping.

Linear

public constant Linear → (2:int32)

Linear filtering for minification, magnification and mip-mapping.

Anisotropic

public constant Anisotropic → (3:int32)

Anisotropic filtering for minification, linear filtering for magnification and mip-mapping.

Address

public constant Address → (252:int32)

Bitmask for texture coordinate addressing mode all 2D texture axes.

AddressU

public constant AddressU → (28:int32)

Bitmask for texture coordinate addressing mode for texture U-axis.

AddressV

public constant AddressV → (224:int32)

Bitmask for texture coordinate addressing mode for texture V-axis.

Border

public constant Border → (36:int32)

Shortcut for BorderU and BorderV flags.

BorderU

public constant BorderU → (4:int32)

Border address mode for texture U-axis.

The texture border color is specified via Color.

BorderV

public constant BorderV → (32:int32)

Border address mode for texture V-axis.

The texture border color is specified via Color.

Clamp

public constant Clamp → (72:int32)

Shortcut for ClampU and ClampV flags.

ClampU

public constant ClampU → (8:int32)

Clamp address mode for texture U-axis.

ClampV

public constant ClampV → (64:int32)

Clamp address mode for texture V-axis.

Mirror

public constant Mirror → (108:int32)

Shortcut for MirrorU and MirrorV flags.

MirrorU

public constant MirrorU → (12:int32)

Mirror address mode for texture U-axis.

MirrorV

public constant MirrorV → (96:int32)

Mirror address mode for texture V-axis.

Wrap

public constant Wrap → (144:int32)

Shortcut for WrapU and WrapV flags.

WrapU

public constant WrapU → (16:int32)

Wrap address mode for texture U-axis.

WrapV

public constant WrapV → (128:int32)

Wrap address mode for texture V-axis.

Color

public constant Color → (3840:int32)

Bitmask for texture border color.

Red

public constant Red → (256:int32)

If present, the red channel of the border color has full intensity. Otherwise it is zero.

Green

public constant Green → (512:int32)

If present, the green channel of the border color has full intensity. Otherwise it is zero.

Blue

public constant Blue → (1024:int32)

If present, the blue channel of the border color has full intensity. Otherwise it is zero.

Alpha

public constant Alpha → (2048:int32)

If present, the alpha channel of the border color has full intensity. Otherwise it is zero.

White

public constant White → (3840:int32)

Shortcut for the Red, Green, Blue and Alpha flags.

All

public constant All → (4095:int32)

All flags.