首页 > 代码库 > Tranparent/cutout/diffuse

Tranparent/cutout/diffuse

Shader "Tranparent/cutout/diffuse" { Properties {   //  _Color ("Main Color", Color) = (1,1,1,1)     _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}     _Cutoff ("Alpha cutoff", Range(0,1)) = 0.5  // 爆光度  _Explosure("Explosure", Float) = 1.0  // 混入黑白       _Brightness("Brightness", Float) = 0    // 整体提亮  _HighLight("HighLight", Float) = 0  // 这里是混入各颜色分量       _MixColor ("Mix Color", COLOR) = (0,0,0,0) }

SubShader {     Tags {"Queue"="AlphaTest" "IgnoreProjector"="True" "RenderType"="TransparentCutout"}     LOD 200  CGPROGRAM  #pragma surface surf Lambert alphatest:_Cutoff  sampler2D _MainTex;  fixed4 _Color;     float _Explosure;  float _HighLight;  float4 _MixColor;  float _Brightness;

 struct Input {   float2 uv_MainTex;  };

 void surf (Input IN, inout SurfaceOutput o)  {   fixed4 c = (tex2D(_MainTex, IN.uv_MainTex) + _MixColor) * _Explosure   + float4(0.21 * _HighLight, 0.72 * _HighLight, 0.07 *_HighLight, 0.0)    + float4(_Brightness,_Brightness,_Brightness, 0.0);    o.Albedo = c.rgb;   o.Alpha = c.a;  }

 ENDCG

 }

 

Fallback "Transparent/Cutout/VertexLit"

}