white.shader 871 B

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