Version: 2022.3

DepthState

struct in UnityEngine.Rendering

切换到手册

描述

深度状态的值。

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

Corresponds to the ZTest and ZWrite commands in ShaderLab.

See Also: RenderStateBlock, [[ScriptableRenderContext.DrawRenderers], ShaderLab command: ZTest, ShaderLab command: ZWrite.

静态变量

defaultValue深度状态的默认值。

变量

compareFunction应如何执行深度测试。
writeEnabled控制是否将此对象的像素写入深度缓冲区。

构造函数

DepthState使用给定值创建新的深度状态。