sha_skill_grey.shader 923 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. Shader "Custom/MySkillIconGrey" {
  2. Properties{
  3. _MainTex("Base (RGB)", 2D) = "red" {}
  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;
  21. o.Albedo = texCol.rgb + _FlashColor.rgb;
  22. o.Albedo.r = texCol.rgb.r + texCol.rgb.g + texCol.rgb.b;
  23. //(texCol.rgb.r + texCol.rgb.g + texCol.rgb.b) / 3;
  24. //o.Albedo.g =
  25. //o.Albedo.b =
  26. //o.Alpha.r = 1;
  27. o.Alpha = texCol.a;
  28. //fixed4 col = tex2D(_MainTex, IN.uv);
  29. //col.rgb *= _Color.rgb;
  30. //o.Albedo = col.rgb;
  31. //UNITY_APPLY_FOG(i.fogCoord, col);
  32. }
  33. ENDCG
  34. }
  35. FallBack "Unlit/Transparent"
  36. }