首页 > 其他 > 详细

Tranparent/cutout/diffuse

时间:2014-05-21 21:41:58      阅读:525      评论:0      收藏:0      [点我收藏+]

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!