Skip to content

Latest commit

 

History

History
107 lines (62 loc) · 3.5 KB

GFXSamplerStateData.rst

File metadata and controls

107 lines (62 loc) · 3.5 KB

GFXSamplerStateData

A sampler state used by GFXStateBlockData.

Inherit:

SimObject

Description

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

Example:

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

Fields