源战役客户端
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

46 lignes
1.1 KiB

  1. // Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
  2. Shader "MyShader/Illusion/Diffuse"
  3. {
  4. Properties{
  5. _Color("Main Color", Color) = (1,1,1,1)
  6. _MainTex("Base (RGB)", 2D) = "white" {}
  7. _Illum("Illumin (A)", 2D) = "white" {}
  8. _Emission("Emission (Lightmapper)", Float) = 1.0
  9. _EmissionIntensity("EmissionIntensity", Range(0, 10)) = 1
  10. }
  11. SubShader{
  12. Tags{ "RenderType" = "Opaque" }
  13. LOD 200
  14. CGPROGRAM
  15. #pragma surface surf Lambert
  16. sampler2D _MainTex;
  17. sampler2D _Illum;
  18. fixed4 _Color;
  19. fixed _Emission;
  20. fixed _EmissionIntensity;
  21. struct Input {
  22. float2 uv_MainTex;
  23. float2 uv_Illum;
  24. };
  25. void surf(Input IN, inout SurfaceOutput o) {
  26. fixed4 tex = tex2D(_MainTex, IN.uv_MainTex);
  27. fixed4 c = tex * _Color;
  28. o.Albedo = c.rgb;
  29. o.Emission = c.rgb * tex2D(_Illum, IN.uv_Illum).a;
  30. #if defined (UNITY_PASS_META)
  31. o.Emission *= _Emission.rrr;
  32. #endif
  33. o.Emission *= _EmissionIntensity;
  34. o.Alpha = c.a;
  35. }
  36. ENDCG
  37. }
  38. FallBack "Legacy Shaders/Self-Illumin/VertexLit"
  39. CustomEditor "LegacyIlluminShaderGUI"
  40. }