GPU の深度クリップモードを固定に設定すると、ステンシルシャドウのレンダリングに役立ちます。つまり、ジオメトリがファークリップ面を越えたときの特殊なケース処理が不要になり、結果的にレンダリング操作が少なくて済みます。ただし、Z の順序が正しくない場合があります。
このコードサンプルでは、Pass ブロックでこのコマンドを使用するための構文を示しています。
Shader "Examples/CommandExample"
{
SubShader
{
// The rest of the code that defines the SubShader goes here.
Pass
{
// Sets the GPU's depth clip mode to clamp for this Pass
// You would typically do this if you are rendering stencil shadows
ZClip False
// The rest of the code that defines the Pass goes here.
}
}
}