Version: Unity 6.0 (6000.0)
语言 : 中文
在着色器中启用保守光栅化
设置着色器的深度偏差

在着色器中设置剔除模式

剔除是确定不绘制什么的过程。剔除提高了渲染效率,因为不会浪费 GPU 时间来绘制在最终图像中不可见的内容。

默认情况下,GPU 执行背面剔除;这意味着它不绘制不面对观看者的多边形。一般来说,渲染工作量减少得越多越好;因此,只在必要时才应更改此设置。

示例

Shader "Examples/CommandExample"
{
    SubShader
    {
         // The rest of the code that defines the SubShader goes here.

        Pass
        {    
              // Disable culling for this Pass.
              // You would typically do this for special effects, such as transparent objects or double-sided walls.
              Cull Off
            
              // The rest of the code that defines the Pass goes here.
        }
    }
}

其他资源

在着色器中启用保守光栅化
设置着色器的深度偏差