public sealed struct Sandbox.Rendering.SamplerState
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);
Related Guides
Broader workflow and conceptual references connected to this API.
Constructors
Showing 1 constructors
public SamplerState()
No results match this filter.
Properties
Showing 7 properties
public Sandbox.Rendering.TextureAddressMode Sandbox.Rendering.SamplerState.AddressModeU { get; set; }
The addressing mode used for the U (X) texture coordinate.
public Sandbox.Rendering.TextureAddressMode Sandbox.Rendering.SamplerState.AddressModeV { get; set; }
The addressing mode used for the V texture coordinate.
public Sandbox.Rendering.TextureAddressMode Sandbox.Rendering.SamplerState.AddressModeW { get; set; }
The addressing mode used for the W texture coordinate.
public Color Sandbox.Rendering.SamplerState.BorderColor { get; set; }
Border color to use if `Sandbox.Rendering.TextureAddressMode.Border` is specified for AddressU, AddressV, or AddressW.
public Sandbox.Rendering.FilterMode Sandbox.Rendering.SamplerState.Filter { get; set; }
The texture filtering mode used for sampling (e.g., point, bilinear, trilinear).
public int Sandbox.Rendering.SamplerState.MaxAnisotropy { get; set; }
The maximum anisotropy level used for anisotropic filtering. Higher values improve texture quality at oblique viewing angles.
public float Sandbox.Rendering.SamplerState.MipLodBias { get; set; }
The bias applied to the calculated mip level during texture sampling. Positive values make textures appear blurrier; negative values sharpen.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox.Rendering |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.Rendering.SamplerState |