源战役客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 line
1.0 KiB

  1. Shader "Legacy Shaders/Self-Illumin/DiffuseSpecial" {
  2. Properties {
  3. _Color ("Main Color", Color) = (1,1,1,1)
  4. _MainTex ("Base (RGB)", 2D) = "white" {}
  5. _Illum ("Illumin (A)", 2D) = "white" {}
  6. _Emission ("Emission (Lightmapper)", Float) = 1.0
  7. //_GlobalSceneAlpha ("GlobalSceneAlpha", Float) = 1.0
  8. }
  9. SubShader {
  10. Tags{ "RenderType" = "Queue" "Queue" = "Transparent" }
  11. Blend SrcAlpha OneMinusSrcAlpha
  12. CGPROGRAM
  13. #pragma surface surf Lambert alphatest:_Cutoff
  14. sampler2D _MainTex;
  15. sampler2D _Illum;
  16. fixed4 _Color;
  17. fixed _Emission;
  18. half _GlobalSceneAlpha;
  19. struct Input {
  20. float2 uv_MainTex;
  21. float2 uv_Illum;
  22. };
  23. void surf (Input IN, inout SurfaceOutput o) {
  24. fixed4 tex = tex2D(_MainTex, IN.uv_MainTex);
  25. fixed4 c = tex * _Color;
  26. o.Albedo = c.rgb;
  27. o.Emission = c.rgb * tex2D(_Illum, IN.uv_Illum).a;
  28. #if defined (UNITY_PASS_META)
  29. o.Emission *= _Emission.rrr;
  30. #endif
  31. o.Alpha = c.a*_GlobalSceneAlpha;
  32. }
  33. ENDCG
  34. }
  35. FallBack "Legacy Shaders/Self-Illumin/VertexLit"
  36. CustomEditor "LegacyIlluminShaderGUI"
  37. }