1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- Shader "Custom/MySkillIconGrey" {
- Properties{
- _MainTex("Base (RGB)", 2D) = "red" {}
- _FlashColor("Flash Color", Color) = (1,1,1,1)
- }
- SubShader
- {
- Tags{ "Queue" = "Transparent" "RenderType" = "Transparent" }
- CGPROGRAM
- #pragma surface surf Lambert alpha exclude_path:prepass noforwardadd
- sampler2D _MainTex;
- float4 _FlashColor;
- struct Input
- {
- half2 uv_MainTex;
- };
- void surf(Input IN, inout SurfaceOutput o)
- {
- half4 texCol = tex2D(_MainTex, IN.uv_MainTex);
- //o.Albedo = texCol;
- o.Albedo = texCol.rgb + _FlashColor.rgb;
- o.Albedo.r = texCol.rgb.r + texCol.rgb.g + texCol.rgb.b;
- //(texCol.rgb.r + texCol.rgb.g + texCol.rgb.b) / 3;
- //o.Albedo.g =
- //o.Albedo.b =
- //o.Alpha.r = 1;
- o.Alpha = texCol.a;
- //fixed4 col = tex2D(_MainTex, IN.uv);
- //col.rgb *= _Color.rgb;
- //o.Albedo = col.rgb;
- //UNITY_APPLY_FOG(i.fogCoord, col);
- }
- ENDCG
- }
- FallBack "Unlit/Transparent"
- }
|