首页 > 代码库 > unity3d: how to display the obj behind the wall

unity3d: how to display the obj behind the wall

透墙显示,遮挡显示,使用ztest

 

Tags { "Queue"="Overlay+1" "RenderType"="Transparent"}     Pass     {         // 透视效果,关闭cull          Cull Off          // 不记录深度值         ZWrite Off         // 被遮挡的也渲染出来,也可以使用always         ZTest Greater         Lighting Off
// 设置混合,效果更好 Blend One One Fog {Mode off} Color [_Color] SetTexture [_MainTex] { combine texture
* primary, texture } }

 

unity3d: how to display the obj behind the wall