Torque3D Documentation / _generateds / GFXSamplerStateData

GFXSamplerStateData

consoledoc.h

A sampler state used by GFXStateBlockData.

More...

Address Mode

The texture address mode for the u coordinate. The default is GFXAddressWrap.

The texture address mode for the v coordinate. The default is GFXAddressWrap.

The texture address mode for the w coordinate. The default is GFXAddressWrap.

Filter State

The texture magnification filter. The default is GFXTextureFilterLinear.

The texture minification filter. The default is GFXTextureFilterLinear.

The texture mipmap filter used during minification. The default is GFXTextureFilterLinear.

float

The mipmap level of detail bias. The default value is zero.

int

The maximum texture anisotropy. The default value is 1.

Public Attributes

Compares sampled data against existing sampled data. The default is GFXCmpNever.

Detailed Description

A sampler state used by GFXStateBlockData.

The samplers define how a texture will be sampled when used from the shader or fixed function device

singleton GFXSamplerStateData(SamplerClampLinear)
{
   textureColorOp = GFXTOPModulate;
   addressModeU = GFXAddressClamp;
   addressModeV = GFXAddressClamp;
   addressModeW = GFXAddressClamp;
   magFilter = GFXTextureFilterLinear;
   minFilter = GFXTextureFilterLinear;
   mipFilter = GFXTextureFilterLinear;
};
There are a few predefined samplers in the core scripts which you can use with GFXStateBlockData for the most common rendering cases:
  • SamplerClampLinear

  • SamplerClampPoint

  • SamplerWrapLinear

  • SamplerWrapPoint

Address Mode

GFXTextureAddressMode addressModeU 

The texture address mode for the u coordinate. The default is GFXAddressWrap.

GFXTextureAddressMode addressModeV 

The texture address mode for the v coordinate. The default is GFXAddressWrap.

GFXTextureAddressMode addressModeW 

The texture address mode for the w coordinate. The default is GFXAddressWrap.

Filter State

GFXTextureFilterType magFilter 

The texture magnification filter. The default is GFXTextureFilterLinear.

GFXTextureFilterType minFilter 

The texture minification filter. The default is GFXTextureFilterLinear.

GFXTextureFilterType mipFilter 

The texture mipmap filter used during minification. The default is GFXTextureFilterLinear.

float mipLODBias 

The mipmap level of detail bias. The default value is zero.

int maxAnisotropy 

The maximum texture anisotropy. The default value is 1.

Public Attributes

GFXCmpFunc samplerFunc 

Compares sampled data against existing sampled data. The default is GFXCmpNever.