mirror of
https://github.com/mob-sakai/UIEffect.git
synced 2026-11-20 18:02:38 +08:00
fix: ColorFilter does not output intended color when vertex color is not white
close #363
This commit is contained in:
@@ -152,6 +152,7 @@ Shader "Hidden/UI/Default (UIEffect)"
|
|||||||
{
|
{
|
||||||
v2f IN = _fragInput;
|
v2f IN = _fragInput;
|
||||||
half4 color = (tex2D(_MainTex, uv) + _TextureSampleAdd);
|
half4 color = (tex2D(_MainTex, uv) + _TextureSampleAdd);
|
||||||
|
color.rgb *= IN.color.rgb;
|
||||||
color.rgb *= color.a;
|
color.rgb *= color.a;
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
@@ -170,7 +171,6 @@ Shader "Hidden/UI/Default (UIEffect)"
|
|||||||
|
|
||||||
_fragInput = IN;
|
_fragInput = IN;
|
||||||
half4 c = uieffect(IN.texcoord, IN.uvMask, IN.worldPosition);
|
half4 c = uieffect(IN.texcoord, IN.uvMask, IN.worldPosition);
|
||||||
c.rgb *= IN.color.rgb;
|
|
||||||
c *= IN.color.a;
|
c *= IN.color.a;
|
||||||
|
|
||||||
#ifdef UNITY_UI_CLIP_RECT
|
#ifdef UNITY_UI_CLIP_RECT
|
||||||
|
|||||||
Reference in New Issue
Block a user