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 } }

 

posted @ 2015-01-14 08:29  summernight  阅读(232)  评论(0)    收藏  举报