DepthState
Values for the depth state.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Struct
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
- Implements: IEquatable<DepthState>
public struct DepthState : IEquatable<DepthState>
Remarks
Use this with RenderStateBlock and ScriptableRenderContext.DrawRenderers to override the GPU's render state.
Additional Resources: RenderStateBlock, [[ScriptableRenderContext.DrawRenderers], ShaderLab command: ZTest, ShaderLab command: ZWrite.
Constructors
Constructor | Description |
|---|---|
| DepthState(System.Boolean,UnityEngine.Rendering.CompareFunction) | Creates a new depth state with the given values. |
Properties
Property | Description |
|---|---|
| compareFunction | How should depth testing be performed. |
| writeEnabled | Controls whether pixels from this object are written to the depth buffer. |
Static Properties
Property | Description |
|---|---|
| defaultValue | Default values for the depth state. |