Skip to content

Commit

Permalink
fix #20; RectMask2D doesn't work on WebGL
Browse files Browse the repository at this point in the history
  • Loading branch information
mob-sakai committed Dec 13, 2018
1 parent bd058b2 commit 79217d0
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions UIAdditive.shader
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
#include "UnityCG.cginc"
#include "UnityUI.cginc"

#pragma multi_compile __ UNITY_UI_CLIP_RECT
#pragma multi_compile __ UNITY_UI_ALPHACLIP

struct appdata_t
Expand Down Expand Up @@ -97,10 +96,7 @@
fixed4 frag(v2f IN) : SV_Target
{
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;

#ifdef UNITY_UI_CLIP_RECT
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
#endif

#ifdef UNITY_UI_ALPHACLIP
clip (color.a - 0.001);
Expand Down

0 comments on commit 79217d0

Please sign in to comment.