zoukankan      html  css  js  c++  java
  • 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"

    }

  • 相关阅读:
    Java基础教程(20)--数字和字符串
    Java基础教程(19)--Object类
    python 选择和循环结构
    购物清单
    第五次安卓作业(计算器和增删改查)
    第四次安卓作业(用户添加)
    第三次安卓作业(用户登录)
    第二次安卓作业(九宫格)
    5.22作业
    5.29作业
  • 原文地址:https://www.cnblogs.com/freebird92/p/3739282.html
Copyright © 2011-2022 走看看