BeAttackFlashColor.shader 601 B

123456789101112131415161718192021222324252627282930313233
  1. Shader "Battle/BeAttackFlashColor"
  2. {
  3. Properties{
  4. _MainTex("Base (RGB)", 2D) = "red" {}
  5. _FlashColor("Flash Color", Color) = (1,1,1,1)
  6. }
  7. SubShader
  8. {
  9. Tags{ "Queue" = "Transparent" "RenderType" = "Transparent" }
  10. CGPROGRAM
  11. #pragma surface surf Lambert alpha exclude_path:prepass noforwardadd  
  12. sampler2D _MainTex;
  13. float4 _FlashColor;
  14. struct Input
  15. {
  16. half2 uv_MainTex;
  17. };
  18. void surf(Input IN, inout SurfaceOutput o)
  19. {
  20. half4 texCol = tex2D(_MainTex, IN.uv_MainTex);
  21. o.Albedo = texCol.rgb + _FlashColor.rgb;
  22. o.Alpha = texCol.a;
  23. }
  24. ENDCG
  25. }
  26. FallBack "Unlit/Transparent"
  27. }