Summary

Represents a sampler state used to control how textures are sampled in shaders. Example usage:
SamplerState mySampler < Attribute("sampler"); >;
C# binding:
var sampler = new SamplerState
{
    Filter = FilterMode.Trilinear,
    AddressModeU = TextureAddressMode.Wrap,
    AddressModeV = TextureAddressMode.Wrap,
    AddressModeW = TextureAddressMode.Clamp,
    MaxAnisotropy = 4
};
            
Graphics.Attributes.Set("sampler", sampler);

Constructors

SamplerState

Properties

AddressModeU The addressing mode used for the U (X) texture coordinate.
AddressModeV The addressing mode used for the V texture coordinate.
AddressModeW The addressing mode used for the W texture coordinate.
BorderColor Border color to use if Sandbox.Rendering.TextureAddressMode.Border is specified for AddressU, AddressV, or AddressW.
Filter The texture filtering mode used for sampling (e.g., point, bilinear, trilinear).
MaxAnisotropy The maximum anisotropy level used for anisotropic filtering. Higher values improve texture quality at oblique viewing angles.
MipLodBias The bias applied to the calculated mip level during texture sampling. Positive values make textures appear blurrier; negative values sharpen.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.