VD-INDIRECTLIGHTING.shader 819 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. Shader "Hidden/VD-INDIRECTLIGHTING" {
  2. Properties {
  3. _Color ("Main Color", Color) = (1,1,1,1)
  4. _MainTex ("Base (RGB)", 2D) = "white" {}
  5. _Illum ("Illumin (A)", 2D) = "white" {}
  6. }
  7. SubShader {
  8. cull off
  9. fog {mode off}
  10. Lighting Off
  11. LOD 200
  12. Tags { "RenderType" = "Opaque" }
  13. CGPROGRAM
  14. #pragma surface surf Lambert addshadow
  15. half _VDIndirectIntensity;
  16. half _VDIndirectContrast;
  17. sampler _MainTex;
  18. sampler2D _Illum;
  19. half4 _Color;
  20. struct Input {
  21. half2 uv_MainTex;
  22. half2 uv_Illum;
  23. };
  24. void surf (Input IN, inout SurfaceOutput o) {
  25. half4 t = tex2D(_MainTex, IN.uv_MainTex);
  26. half4 c = t * _Color;
  27. o.Albedo = c * 0.1;
  28. half4 e = tex2D(_Illum, IN.uv_Illum);
  29. o.Emission = t.rgb * e.a * _VDIndirectIntensity;
  30. o.Alpha = 1.0;
  31. }
  32. ENDCG
  33. }
  34. }