fix #20; RectMask2D doesn't work on WebGL

pull/77/head
mob-sakai 2018-12-13 10:57:45 +09:00
parent bd058b29e1
commit 79217d0100
1 changed files with 0 additions and 4 deletions

View File

@ -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
@ -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);