Skip to content

Commit

Permalink
fix #112; In v2.7.0, UIEffectCapturedImage is flipped vertically on W…
Browse files Browse the repository at this point in the history
…indows
  • Loading branch information
mob-sakai committed Aug 3, 2018
1 parent 4c5f01c commit 61879b8
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Shader "UI/Hidden/UI-EffectCapture"
Name "Effect-Base"

CGPROGRAM
#pragma vertex vert_img
#pragma vertex vert
#pragma fragment frag
#pragma target 2.0

Expand All @@ -32,6 +32,17 @@ Shader "UI/Hidden/UI-EffectCapture"
half4 _EffectFactor;
fixed4 _ColorFactor;

v2f_img vert(appdata_img v)
{
v2f_img o;
o.pos = UnityObjectToClipPos(v.vertex);
o.uv = v.texcoord;
#if UNITY_UV_STARTS_AT_TOP
o.uv.y = 1 - o.uv.y;
#endif
return o;
}

fixed4 frag(v2f_img IN) : SV_Target
{
half effectFactor = _EffectFactor.x;
Expand Down

0 comments on commit 61879b8

Please sign in to comment.