包含此页的版本:
不含此页的版本:
剔除是确定不绘制的内容的过程。剔除提高了渲染效率,因为它不会浪费 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.
}
}
}