Struct DepthStencilStateDescription
A Pipeline component describing the properties of the depth stencil state.
Implements
Inherited Members
Namespace: Veldrid
Assembly: cs.temp.dll.dll
Syntax
public struct DepthStencilStateDescription : IEquatable<DepthStencilStateDescription>
Constructors
DepthStencilStateDescription(Boolean, Boolean, ComparisonKind)
Constructs a new DepthStencilStateDescription. This describes a depth-stencil state with no stencil testing enabled.
Declaration
public DepthStencilStateDescription(bool depthTestEnabled, bool depthWriteEnabled, ComparisonKind comparisonKind)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | depthTestEnabled | Controls whether depth testing is enabled. |
System.Boolean | depthWriteEnabled | Controls whether new depth values are written to the depth buffer. |
ComparisonKind | comparisonKind | The ComparisonKind used when considering new depth values. |
DepthStencilStateDescription(Boolean, Boolean, ComparisonKind, Boolean, StencilBehaviorDescription, StencilBehaviorDescription, Byte, Byte, UInt32)
Constructs a new DepthStencilStateDescription. This describes a depth-stencil state with no stencil testing enabled.
Declaration
public DepthStencilStateDescription(bool depthTestEnabled, bool depthWriteEnabled, ComparisonKind comparisonKind, bool stencilTestEnabled, StencilBehaviorDescription stencilFront, StencilBehaviorDescription stencilBack, byte stencilReadMask, byte stencilWriteMask, uint stencilReference)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | depthTestEnabled | Controls whether depth testing is enabled. |
System.Boolean | depthWriteEnabled | Controls whether new depth values are written to the depth buffer. |
ComparisonKind | comparisonKind | The ComparisonKind used when considering new depth values. |
System.Boolean | stencilTestEnabled | Controls whether the stencil test is enabled. |
StencilBehaviorDescription | stencilFront | Controls how stencil tests are handled for pixels whose surface faces towards the camera. |
StencilBehaviorDescription | stencilBack | Controls how stencil tests are handled for pixels whose surface faces away from the camera. |
System.Byte | stencilReadMask | Controls the portion of the stencil buffer used for reading. |
System.Byte | stencilWriteMask | Controls the portion of the stencil buffer used for writing. |
System.UInt32 | stencilReference | The reference value to use when doing a stencil test. |
Fields
DepthComparison
The ComparisonKind used when considering new depth values.
Declaration
public ComparisonKind DepthComparison
Field Value
Type | Description |
---|---|
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
Declaration
public static readonly DepthStencilStateDescription DepthOnlyGreaterEqual
Field Value
Type | Description |
---|---|
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
Declaration
public static readonly DepthStencilStateDescription DepthOnlyGreaterEqualRead
Field Value
Type | Description |
---|---|
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
Declaration
public static readonly DepthStencilStateDescription DepthOnlyLessEqual
Field Value
Type | Description |
---|---|
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
Declaration
public static readonly DepthStencilStateDescription DepthOnlyLessEqualRead
Field Value
Type | Description |
---|---|
DepthStencilStateDescription |
DepthTestEnabled
Controls whether depth testing is enabled.
Declaration
public bool DepthTestEnabled
Field Value
Type | Description |
---|---|
System.Boolean |
DepthWriteEnabled
Controls whether new depth values are written to the depth buffer.
Declaration
public bool DepthWriteEnabled
Field Value
Type | Description |
---|---|
System.Boolean |
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
Declaration
public static readonly DepthStencilStateDescription Disabled
Field Value
Type | Description |
---|---|
DepthStencilStateDescription |
StencilBack
Controls how stencil tests are handled for pixels whose surface faces away from the camera.
Declaration
public StencilBehaviorDescription StencilBack
Field Value
Type | Description |
---|---|
StencilBehaviorDescription |
StencilFront
Controls how stencil tests are handled for pixels whose surface faces towards the camera.
Declaration
public StencilBehaviorDescription StencilFront
Field Value
Type | Description |
---|---|
StencilBehaviorDescription |
StencilReadMask
Controls the portion of the stencil buffer used for reading.
Declaration
public byte StencilReadMask
Field Value
Type | Description |
---|---|
System.Byte |
StencilReference
The reference value to use when doing a stencil test.
Declaration
public uint StencilReference
Field Value
Type | Description |
---|---|
System.UInt32 |
StencilTestEnabled
Controls whether the stencil test is enabled.
Declaration
public bool StencilTestEnabled
Field Value
Type | Description |
---|---|
System.Boolean |
StencilWriteMask
Controls the portion of the stencil buffer used for writing.
Declaration
public byte StencilWriteMask
Field Value
Type | Description |
---|---|
System.Byte |
Methods
Equals(DepthStencilStateDescription)
Element-wise equality.
Declaration
public bool Equals(DepthStencilStateDescription other)
Parameters
Type | Name | Description |
---|---|---|
DepthStencilStateDescription | other | The instance to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | True if all elements are equal; false otherswise. |
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A 32-bit signed integer that is the hash code for this instance. |