Api Sandbox Rendering SamplerState
struct

SamplerState

public sealed struct SamplerState

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

Name Type Description
Filter FilterMode The texture filtering mode used for sampling (e.g., point, bilinear, trilinear).
AddressModeU TextureAddressMode The addressing mode used for the U (X) texture coordinate.
AddressModeV TextureAddressMode The addressing mode used for the V texture coordinate.
AddressModeW TextureAddressMode The addressing mode used for the W texture coordinate.
MipLodBias Single The bias applied to the calculated mip level during texture sampling. Positive values make textures appear blurrier; negative values sharpen.
MaxAnisotropy Int32 The maximum anisotropy level used for anisotropic filtering. Higher values improve texture quality at oblique viewing angles.
BorderColor Color Border color to use if Border is specified for AddressU, AddressV, or AddressW.
Assembly: Sandbox.Engine Namespace: Sandbox.Rendering Full Name: Sandbox.Rendering.SamplerState