Table of Contents

Struct SamplerStateDescription

Namespace
Stride.Graphics
Assembly
Stride.dll

Describes a sampler state.

[DataContract]
public struct SamplerStateDescription : IEquatable<SamplerStateDescription>
Implements
Inherited Members

Constructors

SamplerStateDescription(TextureFilter, TextureAddressMode)

Initializes a new instance of the SamplerStateDescription class.

public SamplerStateDescription(TextureFilter filter, TextureAddressMode addressMode)

Parameters

filter TextureFilter

The filter.

addressMode TextureAddressMode

The address mode.

Fields

AddressU

Gets or sets method to use for resolving a u texture coordinate that is outside the 0 to 1 range (see TextureAddressMode).

public TextureAddressMode AddressU

Field Value

TextureAddressMode

AddressV

Gets or sets method to use for resolving a v texture coordinate that is outside the 0 to 1 range.

public TextureAddressMode AddressV

Field Value

TextureAddressMode

AddressW

Gets or sets method to use for resolving a w texture coordinate that is outside the 0 to 1 range.

public TextureAddressMode AddressW

Field Value

TextureAddressMode

BorderColor

Gets or sets border color to use if Border is specified for AddressU, AddressV, or AddressW. Range must be between 0.0 and 1.0 inclusive.

public Color4 BorderColor

Field Value

Color4

CompareFunction

Gets or sets a function that compares sampled data against existing sampled data. The function options are listed in CompareFunction.

public CompareFunction CompareFunction

Field Value

CompareFunction

Filter

Gets or sets filtering method to use when sampling a texture (see TextureFilter).

public TextureFilter Filter

Field Value

TextureFilter

MaxAnisotropy

Gets or sets clamping value used if Anisotropy or ComparisonAnisotropy is specified in Filter. Valid values are between 1 and 16.

public int MaxAnisotropy

Field Value

int

MaxMipLevel

Gets or sets upper end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed. This value must be greater than or equal to MinLOD. To have no upper limit on LOD set this to a large value such as D3D11_FLOAT32_MAX.

public float MaxMipLevel

Field Value

float

MinMipLevel

Gets or sets lower end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed.

public float MinMipLevel

Field Value

float

MipMapLevelOfDetailBias

Gets or sets offset from the calculated mipmap level. For example, if Direct3D calculates that a texture should be sampled at mipmap level 3 and MipLODBias is 2, then the texture will be sampled at mipmap level 5.

public float MipMapLevelOfDetailBias

Field Value

float

Properties

Default

Gets default values for this instance.

public static SamplerStateDescription Default { get; }

Property Value

SamplerStateDescription

Methods

Equals(SamplerStateDescription)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(SamplerStateDescription other)

Parameters

other SamplerStateDescription

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.