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
depthTestEnabledboolControls whether depth testing is enabled.
depthWriteEnabledboolControls whether new depth values are written to the depth buffer.
comparisonKindComparisonKindThe 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
depthTestEnabledboolControls whether depth testing is enabled.
depthWriteEnabledboolControls whether new depth values are written to the depth buffer.
comparisonKindComparisonKindThe ComparisonKind used when considering new depth values.
stencilTestEnabledboolControls whether the stencil test is enabled.
stencilFrontStencilBehaviorDescriptionControls how stencil tests are handled for pixels whose surface faces towards the camera.
stencilBackStencilBehaviorDescriptionControls how stencil tests are handled for pixels whose surface faces away from the camera.
stencilReadMaskbyteControls the portion of the stencil buffer used for reading.
stencilWriteMaskbyteControls the portion of the stencil buffer used for writing.
stencilReferenceuintThe reference value to use when doing a stencil test.
Fields
DepthComparison
The ComparisonKind used when considering new depth values.
public ComparisonKind DepthComparison
Field Value
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
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
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
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
DepthTestEnabled
Controls whether depth testing is enabled.
public bool DepthTestEnabled
Field Value
DepthWriteEnabled
Controls whether new depth values are written to the depth buffer.
public bool DepthWriteEnabled
Field Value
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
StencilBack
Controls how stencil tests are handled for pixels whose surface faces away from the camera.
public StencilBehaviorDescription StencilBack
Field Value
StencilFront
Controls how stencil tests are handled for pixels whose surface faces towards the camera.
public StencilBehaviorDescription StencilFront
Field Value
StencilReadMask
Controls the portion of the stencil buffer used for reading.
public byte StencilReadMask
Field Value
StencilReference
The reference value to use when doing a stencil test.
public uint StencilReference
Field Value
StencilTestEnabled
Controls whether the stencil test is enabled.
public bool StencilTestEnabled
Field Value
StencilWriteMask
Controls the portion of the stencil buffer used for writing.
public byte StencilWriteMask
Field Value
Methods
Equals(DepthStencilStateDescription)
Element-wise equality.
public bool Equals(DepthStencilStateDescription other)
Parameters
otherDepthStencilStateDescriptionThe 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.