Table of Contents

Struct DepthStencilStateDescription

Namespace
NeoVeldrid
Assembly
NeoVeldrid.dll

A Pipeline component describing the properties of the depth stencil state.

public struct DepthStencilStateDescription : IEquatable<DepthStencilStateDescription>
Implements
Inherited Members

Constructors

DepthStencilStateDescription(bool, bool, ComparisonKind)

Constructs a new DepthStencilStateDescription. This describes a depth-stencil state with no stencil testing enabled.

public DepthStencilStateDescription(bool depthTestEnabled, bool depthWriteEnabled, ComparisonKind comparisonKind)

Parameters

depthTestEnabled bool

Controls whether depth testing is enabled.

depthWriteEnabled bool

Controls whether new depth values are written to the depth buffer.

comparisonKind ComparisonKind

The ComparisonKind used when considering new depth values.

DepthStencilStateDescription(bool, bool, ComparisonKind, bool, StencilBehaviorDescription, StencilBehaviorDescription, byte, byte, uint)

Constructs a new DepthStencilStateDescription. This describes a depth-stencil state with no stencil testing enabled.

public DepthStencilStateDescription(bool depthTestEnabled, bool depthWriteEnabled, ComparisonKind comparisonKind, bool stencilTestEnabled, StencilBehaviorDescription stencilFront, StencilBehaviorDescription stencilBack, byte stencilReadMask, byte stencilWriteMask, uint stencilReference)

Parameters

depthTestEnabled bool

Controls whether depth testing is enabled.

depthWriteEnabled bool

Controls whether new depth values are written to the depth buffer.

comparisonKind ComparisonKind

The ComparisonKind used when considering new depth values.

stencilTestEnabled bool

Controls whether the stencil test is enabled.

stencilFront StencilBehaviorDescription

Controls how stencil tests are handled for pixels whose surface faces towards the camera.

stencilBack StencilBehaviorDescription

Controls how stencil tests are handled for pixels whose surface faces away from the camera.

stencilReadMask byte

Controls the portion of the stencil buffer used for reading.

stencilWriteMask byte

Controls the portion of the stencil buffer used for writing.

stencilReference uint

The reference value to use when doing a stencil test.

Fields

DepthComparison

The ComparisonKind used when considering new depth values.

public ComparisonKind DepthComparison

Field Value

ComparisonKind

DepthOnlyGreaterEqual

Describes a depth-only depth stencil state which uses a GreaterEqual comparison. The stencil test is disabled. Settings: DepthTestEnabled = true DepthWriteEnabled = true ComparisonKind = DepthComparisonKind.GreaterEqual

public static readonly DepthStencilStateDescription DepthOnlyGreaterEqual

Field Value

DepthStencilStateDescription

DepthOnlyGreaterEqualRead

Describes a depth-only depth stencil state which uses a GreaterEqual comparison, and disables writing to the depth buffer. The stencil test is disabled. Settings: DepthTestEnabled = true DepthWriteEnabled = false ComparisonKind = DepthComparisonKind.GreaterEqual

public static readonly DepthStencilStateDescription DepthOnlyGreaterEqualRead

Field Value

DepthStencilStateDescription

DepthOnlyLessEqual

Describes a depth-only depth stencil state which uses a LessEqual comparison. The stencil test is disabled. Settings: DepthTestEnabled = true DepthWriteEnabled = true ComparisonKind = DepthComparisonKind.LessEqual

public static readonly DepthStencilStateDescription DepthOnlyLessEqual

Field Value

DepthStencilStateDescription

DepthOnlyLessEqualRead

Describes a depth-only depth stencil state which uses a LessEqual comparison, and disables writing to the depth buffer. The stencil test is disabled. Settings: DepthTestEnabled = true DepthWriteEnabled = false ComparisonKind = DepthComparisonKind.LessEqual

public static readonly DepthStencilStateDescription DepthOnlyLessEqualRead

Field Value

DepthStencilStateDescription

DepthTestEnabled

Controls whether depth testing is enabled.

public bool DepthTestEnabled

Field Value

bool

DepthWriteEnabled

Controls whether new depth values are written to the depth buffer.

public bool DepthWriteEnabled

Field Value

bool

Disabled

Describes a depth-only depth stencil state in which depth testing and writing is disabled. The stencil test is disabled. Settings: DepthTestEnabled = false DepthWriteEnabled = false ComparisonKind = DepthComparisonKind.LessEqual

public static readonly DepthStencilStateDescription Disabled

Field Value

DepthStencilStateDescription

StencilBack

Controls how stencil tests are handled for pixels whose surface faces away from the camera.

public StencilBehaviorDescription StencilBack

Field Value

StencilBehaviorDescription

StencilFront

Controls how stencil tests are handled for pixels whose surface faces towards the camera.

public StencilBehaviorDescription StencilFront

Field Value

StencilBehaviorDescription

StencilReadMask

Controls the portion of the stencil buffer used for reading.

public byte StencilReadMask

Field Value

byte

StencilReference

The reference value to use when doing a stencil test.

public uint StencilReference

Field Value

uint

StencilTestEnabled

Controls whether the stencil test is enabled.

public bool StencilTestEnabled

Field Value

bool

StencilWriteMask

Controls the portion of the stencil buffer used for writing.

public byte StencilWriteMask

Field Value

byte

Methods

Equals(DepthStencilStateDescription)

Element-wise equality.

public bool Equals(DepthStencilStateDescription other)

Parameters

other DepthStencilStateDescription

The instance to compare to.

Returns

bool

True if all elements are equal; false otherswise.

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.