GraphicsAPI reference
Struct SamplerDescription
Namespace: MicroEngine.Graphics.Devices
Assembly: MicroEngine.Graphics.dll
Guide: The graphics device
Immutable sampler state, a value: GetSampler returns a cached device object for it.
Sampling is never texture state. Min different from Mag requires
SeparateFilters. Mip applies only to textures with more than one
mip level and is otherwise ignored (so LinearClamp works on every tier).
public readonly struct SamplerDescription : IEquatable<SamplerDescription>Implements
IEquatable<SamplerDescription>
Constructors
SamplerDescription(Filter, Filter, Filter, AddressMode, AddressMode)
Immutable sampler state, a value: GetSampler returns a cached device object for it.
Sampling is never texture state. Min different from Mag requires
SeparateFilters. Mip applies only to textures with more than one
mip level and is otherwise ignored (so LinearClamp works on every tier).
public SamplerDescription(Filter Min = Filter.Nearest, Filter Mag = Filter.Nearest, Filter Mip = Filter.Nearest, AddressMode U = AddressMode.Clamp, AddressMode V = AddressMode.Clamp)Parameters
Min Filter
Minification filter.
Mag Filter
Magnification filter.
Mip Filter
Filter between mip levels.
Horizontal address mode.
Vertical address mode.
Fields
LinearClamp
Linear, clamped.
public static readonly SamplerDescription LinearClampField Value
PointClamp
Nearest, clamped: pixel art and exact copies.
public static readonly SamplerDescription PointClampField Value
Properties
Mag
Magnification filter.
public Filter Mag { get; init; }Property Value
Min
Minification filter.
public Filter Min { get; init; }Property Value
Mip
Filter between mip levels.
public Filter Mip { get; init; }Property Value
U
Horizontal address mode.
public AddressMode U { get; init; }Property Value
V
Vertical address mode.
public AddressMode V { get; init; }Property Value
Methods
Deconstruct(out Filter, out Filter, out Filter, out AddressMode, out AddressMode)
public void Deconstruct(out Filter Min, out Filter Mag, out Filter Mip, out AddressMode U, out AddressMode V)Parameters
Min Filter
Mag Filter
Mip Filter
Equals(object)
public override bool Equals(object obj)Parameters
obj object
Returns
Equals(SamplerDescription)
public bool Equals(SamplerDescription other)Parameters
other SamplerDescription
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(SamplerDescription, SamplerDescription)
public static bool operator ==(SamplerDescription left, SamplerDescription right)Parameters
left SamplerDescription
right SamplerDescription
Returns
operator !=(SamplerDescription, SamplerDescription)
public static bool operator !=(SamplerDescription left, SamplerDescription right)Parameters
left SamplerDescription
right SamplerDescription