ドキュメント

Unity Engine

Unity Engine

DepthState

Values for the depth state.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

public struct DepthState : IEquatable<DepthState>

Remarks

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.

Constructors

Constructor

Description

DepthState(System.Boolean,UnityEngine.Rendering.CompareFunction)Creates a new depth state with the given values.

Properties

Property

Description

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

Static Properties

Property

Description

defaultValueDefault values for the depth state.