unity中的Culling Mask

摄像机按层渲染

Camera.cullingMask = 1<<x;//渲染x层

Camera.cullingMask = ~(1<<x);//渲染除去x的所有层

Camera.cullingMask &= ~(1<<x);//关闭层x

Camera.cullingMask |= (1<<x);//打开层x

Camera.cullingMask = (1<<x) + (1<<y) + (1<<z);//摄像机只显示x,y,z层。

CullingMask = 0//nothing

CullingMask = -1//everything

上一篇:论文阅读:Simulation-based temporal projection of everyday robot object manipulation


下一篇:Unity3D-游戏场景优化之遮挡剔除(Occlusion Culling)的使用