Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2014
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.10 KB | None | 0 0
  1. Shader "tk2d/LitBlendVertexColor"
  2. {
  3.     Properties
  4.     {
  5.         _MainTex ("Base (RGB)", 2D) = "white" {}
  6.     }
  7.    
  8.     SubShader
  9.     {
  10.         Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
  11.         ZWrite Off Blend SrcAlpha OneMinusSrcAlpha Cull Off Fog { Mode Off }
  12.         LOD 110
  13.  
  14.         CGPROGRAM
  15.         #pragma surface surf Lambert alpha
  16.         struct Input {
  17.             float2 uv_MainTex;
  18.             fixed4 color : COLOR;
  19.         };
  20.         sampler2D _MainTex;
  21.         void surf(Input IN, inout SurfaceOutput o)
  22.         {
  23.             fixed4 mainColor = tex2D(_MainTex, IN.uv_MainTex) * IN.color;
  24.             o.Albedo = mainColor.rgb;
  25.             o.Alpha = mainColor.a;
  26.         }
  27.         ENDCG      
  28.     }
  29.    
  30.     SubShader
  31.     {
  32.         Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
  33.         ZWrite Off Blend SrcAlpha OneMinusSrcAlpha Cull Off Fog { Mode Off }
  34.         LOD 100
  35.         Pass
  36.         {
  37.             Tags {"LightMode" = "Vertex"}
  38.            
  39.             ColorMaterial AmbientAndDiffuse
  40.             Lighting On
  41.            
  42.             SetTexture [_MainTex]
  43.             {
  44.                 Combine texture * primary double, texture * primary
  45.             }
  46.         }
  47.     }
  48.  
  49.     Fallback "tk2d/BlendVertexColor", 1
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement