123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- // alpha-cutout billboard shader
- Shader "MTE/Grass/AlphaCutout"
- {
- Properties
- {
- _Color("Main Color", Color) = (1,1,1,1)
- _MainTex("Base (RGB) Trans (A)", 2D) = "white" {}
- _Cutoff("Alpha cutoff", Range(0,1)) = 0.5
- }
- CGINCLUDE
- #pragma surface surf Lambert alphatest:_Cutoff
- sampler2D _MainTex;
- fixed4 _Color;
- struct Input
- {
- float2 uv_MainTex;
- };
- void surf(Input IN, inout SurfaceOutput o)
- {
- fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
- o.Albedo = c.rgb;
- o.Alpha = c.a;
- }
- ENDCG
- Category
- {
- Tags
- {
- "Queue" = "AlphaTest"
- "IgnoreProjector" = "True"
- "RenderType" = "TransparentCutout"
- }
- LOD 100
- SubShader//for target 3.0+
- {
- CGPROGRAM
- #pragma target 3.0
- ENDCG
- }
- SubShader//for target 2.5
- {
- CGPROGRAM
- #pragma target 2.5
- ENDCG
- }
- SubShader//for target 2.0
- {
- CGPROGRAM
- #pragma target 2.0
- ENDCG
- }
- }
- Fallback "Legacy Shaders/Transparent/Cutout/VertexLit"
- }
|