Advertisement
infinite_ammo

TransformCutoutDiffuseNoCull.shader

Apr 21st, 2012
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. Shader "Transparent/Cutout/Diffuse NoCull" {
  2. Properties {
  3. _Color ("Main Color", Color) = (1,1,1,1)
  4. _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
  5. _Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
  6. }
  7.  
  8. SubShader {
  9. Tags {"Queue"="AlphaTest" "IgnoreProjector"="True" "RenderType"="TransparentCutout"}
  10. LOD 200
  11. Cull Off
  12.  
  13. CGPROGRAM
  14. #pragma surface surf Lambert alphatest:_Cutoff
  15.  
  16. sampler2D _MainTex;
  17. fixed4 _Color;
  18.  
  19. struct Input {
  20. float2 uv_MainTex;
  21. };
  22.  
  23. void surf (Input IN, inout SurfaceOutput o) {
  24. fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
  25. o.Albedo = c.rgb;
  26. o.Alpha = c.a;
  27. }
  28. ENDCG
  29. }
  30.  
  31. Fallback "Transparent/Cutout/VertexLit"
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement