Hi there! I have a Properties in my 2D sprite shader Properties{ _Color ("Tint", Color) = (0, 0, 0, 1) _MainTex ("Texture", 2D) = "white" {} } you can see _Color for property just for change a color of object But how to use alpha value from this color? in frag shader fixed4 frag(v2f i) : SV_TARGET{ fixed4 col = tex2D(_MainTex, i.uv); float blender = _Color.a; <---- I really want to use _Color.a add to float blender return col; } this is possible?
Use it for what? You're already "using it", you're assigning it to the float blender and then doing nothing with it.
@Rachan when you solve your problem it would be polite to tell here how you did it. This way others can benefit from the answer when they are searching a solution to a similar issue. After all, this is not a "work for free" forum where you get free consultation and delete the thread after your problem got sorted out.
Actually I just use that variable by just call float blender = i.color.a; I use alpha of a color and then it ok now