Skip to content

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).

C#
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).

C#
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.

U AddressMode

Horizontal address mode.

V AddressMode

Vertical address mode.

Fields

LinearClamp

Linear, clamped.

C#
public static readonly SamplerDescription LinearClamp

Field Value

SamplerDescription

PointClamp

Nearest, clamped: pixel art and exact copies.

C#
public static readonly SamplerDescription PointClamp

Field Value

SamplerDescription

Properties

Mag

Magnification filter.

C#
public Filter Mag { get; init; }

Property Value

Filter

Min

Minification filter.

C#
public Filter Min { get; init; }

Property Value

Filter

Mip

Filter between mip levels.

C#
public Filter Mip { get; init; }

Property Value

Filter

U

Horizontal address mode.

C#
public AddressMode U { get; init; }

Property Value

AddressMode

V

Vertical address mode.

C#
public AddressMode V { get; init; }

Property Value

AddressMode

Methods

Deconstruct(out Filter, out Filter, out Filter, out AddressMode, out AddressMode)

C#
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

U AddressMode

V AddressMode

Equals(object)

C#
public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(SamplerDescription)

C#
public bool Equals(SamplerDescription other)

Parameters

other SamplerDescription

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(SamplerDescription, SamplerDescription)

C#
public static bool operator ==(SamplerDescription left, SamplerDescription right)

Parameters

left SamplerDescription

right SamplerDescription

Returns

bool

operator !=(SamplerDescription, SamplerDescription)

C#
public static bool operator !=(SamplerDescription left, SamplerDescription right)

Parameters

left SamplerDescription

right SamplerDescription

Returns

bool