Table of Contents

Struct Sampler

Namespace
Xui.GPU.Shaders.Types
Assembly
Xui.Core.dll

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

minFilter FilterMode
magFilter FilterMode
addressU AddressMode
addressV AddressMode

Properties

AddressU

Gets the addressing mode for the U coordinate.

public AddressMode AddressU { get; init; }

Property Value

AddressMode

AddressV

Gets the addressing mode for the V coordinate.

public AddressMode AddressV { get; init; }

Property Value

AddressMode

LinearClamp

Gets a default linear sampler with clamp-to-edge addressing.

public static Sampler LinearClamp { get; }

Property Value

Sampler

LinearRepeat

Gets a default linear sampler with repeat addressing.

public static Sampler LinearRepeat { get; }

Property Value

Sampler

MagFilter

Gets the magnification filter mode.

public FilterMode MagFilter { get; init; }

Property Value

FilterMode

MinFilter

Gets the minification filter mode.

public FilterMode MinFilter { get; init; }

Property Value

FilterMode

PointClamp

Gets a default point sampler with clamp-to-edge addressing.

public static Sampler PointClamp { get; }

Property Value

Sampler

PointRepeat

Gets a default point sampler with repeat addressing.

public static Sampler PointRepeat { get; }

Property Value

Sampler