stencil in unity3d

Pass {
            Stencil { 
              Ref 1 
              Comp Always 
              Pass REPLACE 
            }
            
            AlphaTest Greater 0
            Blend SrcAlpha OneMinusSrcAlpha 
            Color[_Color]
            SetTexture[_MainTex] {
                Combine texture
            }
        }
        
        // render outline
        
        Pass {
        
            Stencil {
                Ref 1
                //Comp Always
                Comp NotEqual
               
            }
            
            Cull Off
            ZWrite Off
            
            AlphaTest Greater 0.9
            Blend SrcAlpha OneMinusSrcAlpha 
...
}

 

posted @ 2015-01-29 17:04  summernight  阅读(280)  评论(0编辑  收藏  举报