Advertisement
dnnkeeper

UnityShader/Transparent/VertexAlpha

Feb 4th, 2014
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.61 KB | None | 0 0
  1. Shader "Transparent/VertexAlpha" {
  2. Properties
  3. {
  4.     _Color ("Main Color", Color) = (1,1,1,1)
  5.     _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
  6. }
  7.  
  8. SubShader
  9. {
  10.     Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
  11.     LOD 200
  12.  
  13. CGPROGRAM
  14. #pragma surface surf Lambert alpha
  15.  
  16.     sampler2D _MainTex;
  17.     fixed4 _Color;
  18.  
  19.     struct Input {
  20.         float2 uv_MainTex;
  21.         float4 color: COLOR;
  22.     };
  23.  
  24.     void surf (Input IN, inout SurfaceOutput o) {
  25.         fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
  26.         o.Albedo = c.rgb;
  27.         o.Alpha = IN.color.a;
  28.     }
  29. ENDCG
  30. }
  31.  
  32.     Fallback "Transparent/VertexLit"
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement