Files
2025-05-13 05:05:49 +03:00

28 lines
516 B
Plaintext

Shader "Custom/Joystick" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
_TintColor("Color Tint", Color) = (1,1,1,1)
}
SubShader {
Blend SrcAlpha OneMinusSrcAlpha
CGPROGRAM
#pragma surface surf Lambert
float4 _TintColor;
sampler2D _MainTex;
struct Input {
float2 uv_MainTex;
};
void surf (Input IN, inout SurfaceOutput o) {
float c = tex2D (_MainTex, IN.uv_MainTex).a;
o.Albedo = _TintColor.rgb;
o.Alpha = c * _TintColor.a;
}
ENDCG
}
FallBack "Diffuse"
}