码迷,mamicode.com
首页 > 其他好文 > 详细

Tranparent/cutout/diffuse

时间:2014-05-21 21:42:16      阅读:279      评论:0      收藏:0      [点我收藏+]

标签:c   color   a   int   rgb   os   

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"

}

Tranparent/cutout/diffuse,布布扣,bubuko.com

Tranparent/cutout/diffuse

标签:c   color   a   int   rgb   os   

原文地址:http://www.cnblogs.com/freebird92/p/3739282.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!