API ReferenceSandbox.Rendering

SamplerStateclass

Represents a sampler state used to control how textures are sampled in shaders. Example usage: SamplerState mySampler ; 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);

objectSamplerState
Namespace
Sandbox.Rendering
Assembly
Sandbox.Engine
Declaration
public sealed struct Sandbox.Rendering.SamplerState

Constructors1

Showing 1 constructors

Properties7

Showing 7 properties

public Color Sandbox.Rendering.SamplerState.BorderColor { get; set; }PUBLICGETSET

Border color to use if `Sandbox.Rendering.TextureAddressMode.Border` is specified for AddressU, AddressV, or AddressW.

Returns:Color

public Sandbox.Rendering.FilterMode Sandbox.Rendering.SamplerState.Filter { get; set; }PUBLICGETSET

The texture filtering mode used for sampling (e.g., point, bilinear, trilinear).

Returns:FilterMode

public int Sandbox.Rendering.SamplerState.MaxAnisotropy { get; set; }PUBLICGETSET

The maximum anisotropy level used for anisotropic filtering. Higher values improve texture quality at oblique viewing angles.

Returns:int

public float Sandbox.Rendering.SamplerState.MipLodBias { get; set; }PUBLICGETSET

The bias applied to the calculated mip level during texture sampling. Positive values make textures appear blurrier; negative values sharpen.

Returns:float

On this page