Struct Sampler
Represents a texture sampler that controls how textures are sampled.
public readonly struct Sampler
- Inherited Members
Remarks
Samplers define the filtering and addressing behavior when reading from textures.
Constructors
Sampler(FilterMode, FilterMode, AddressMode, AddressMode)
Initializes a new instance of the Sampler struct.
public Sampler(FilterMode minFilter = FilterMode.Linear, FilterMode magFilter = FilterMode.Linear, AddressMode addressU = AddressMode.Repeat, AddressMode addressV = AddressMode.Repeat)
Parameters
minFilterFilterModemagFilterFilterModeaddressUAddressModeaddressVAddressMode
Properties
AddressU
Gets the addressing mode for the U coordinate.
public AddressMode AddressU { get; init; }
Property Value
AddressV
Gets the addressing mode for the V coordinate.
public AddressMode AddressV { get; init; }
Property Value
LinearClamp
Gets a default linear sampler with clamp-to-edge addressing.
public static Sampler LinearClamp { get; }
Property Value
LinearRepeat
Gets a default linear sampler with repeat addressing.
public static Sampler LinearRepeat { get; }
Property Value
MagFilter
Gets the magnification filter mode.
public FilterMode MagFilter { get; init; }
Property Value
MinFilter
Gets the minification filter mode.
public FilterMode MinFilter { get; init; }
Property Value
PointClamp
Gets a default point sampler with clamp-to-edge addressing.
public static Sampler PointClamp { get; }
Property Value
PointRepeat
Gets a default point sampler with repeat addressing.
public static Sampler PointRepeat { get; }