(转载)Unity3D研究院之处理摄像机与角色之间被挡时的局部透明效果

来源:互联网 发布:淘宝BB8机器人 编辑:程序博客网 时间:2024/06/06 08:40

转载http://www.xuanyusong.com/archives/3466


原文: http://qiita.com/YosukeM/items/a9d88672a8bf516f78a7

我改了一下他的shader.

Shader"Custom/PlayerDiffuse"{    Properties{        _NotVisibleColor("NotVisibleColor (RGB)",Color)=(0.3,0.3,0.3,1)        _MainTex("Base (RGB)",2D)="white"{}    }    SubShader{        Tags{"Queue"="Geometry+500""RenderType"="Opaque"}        LOD200         Pass{            ZTestGreater            LightingOff            ZWriteOff        //   Color [_NotVisibleColor]            BlendSrcAlphaOneMinusSrcAlpha            SetTexture[_MainTex]{ConstantColor[_NotVisibleColor]combineconstant *texture}                    }         Pass{            ZTestLEqual            Material{                Diffuse(1,1,1,1)                Ambient(1,1,1,1)            }            LightingOff            SetTexture[_MainTex]{combinetexture}        }     }    FallBack"Diffuse"}



0 0
原创粉丝点击