• 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"

    }

  • 相关阅读:
    redis 学习(一)
    spring 学习总结(一)
    Struts2 学习(三)
    Python3 高级特性
    Python3 模块
    Python3 函数式编程
    Python3 函数
    Python3 列表
    Python3 字符编码
    Java Servlet 回顾
  • 原文地址:https://www.cnblogs.com/freebird92/p/3739282.html
Copyright © 2020-2023  润新知