Self-Illumin.shader 856 B

123456789101112131415161718192021222324252627282930313233343536
  1. Shader "Self-Illumin/Transparent/Cutout/Diffuse" {
  2. Properties{
  3. _Color("Main Color", Color) = (1,1,1,1)
  4. _MainTex("Base (RGB) Trans (A)", 2D) = "white" {}
  5. _Cutoff("Alpha cutoff", Range(0,1)) = 0.5
  6. _Illum("Illumin (A)", 2D) = "white" {}
  7. _EmissionLM("Emission (Lightmapper)", Float) = 0
  8. }
  9. SubShader{
  10. Tags{ "Queue" = "AlphaTest" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
  11. LOD 200
  12. CGPROGRAM
  13. #pragma surface surf Lambert
  14. sampler2D _MainTex;
  15. sampler2D _Illum;
  16. fixed4 _Color;
  17. struct Input {
  18. float2 uv_MainTex;
  19. float2 uv_Illum;
  20. };
  21. void surf(Input IN, inout SurfaceOutput o) {
  22. fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
  23. o.Albedo = c.rgb;
  24. o.Emission = c.rgb * tex2D(_Illum, IN.uv_Illum).a;
  25. o.Alpha = c.a;
  26. }
  27. ENDCG
  28. }
  29. Fallback "Transparent/Cutout/VertexLit"
  30. }