DepthState

struct in UnityEngine.Rendering

/

Implemented in:UnityEngine.CoreModule

Description

Values for the depth state.

Use this with RenderStateBlock and ScriptableRenderContext.DrawRenderers to override the GPU's render state.

Corresponds to the ZTest and ZWrite commands in ShaderLab.

Additional resources: RenderStateBlock, [[ScriptableRenderContext.DrawRenderers], ShaderLab command: ZTest, ShaderLab command: ZWrite.

Static Properties

Property Description
defaultValueDefault values for the depth state.

Properties

Property Description
compareFunctionHow should depth testing be performed.
writeEnabledControls whether pixels from this object are written to the depth buffer.

Constructors

Constructor Description
DepthStateCreates a new depth state with the given values.

Did you find this page useful? Please give it a rating: