fix #20; RectMask2D doesn't work on WebGL
parent
bd058b29e1
commit
79217d0100
|
@ -54,7 +54,6 @@
|
||||||
#include "UnityCG.cginc"
|
#include "UnityCG.cginc"
|
||||||
#include "UnityUI.cginc"
|
#include "UnityUI.cginc"
|
||||||
|
|
||||||
#pragma multi_compile __ UNITY_UI_CLIP_RECT
|
|
||||||
#pragma multi_compile __ UNITY_UI_ALPHACLIP
|
#pragma multi_compile __ UNITY_UI_ALPHACLIP
|
||||||
|
|
||||||
struct appdata_t
|
struct appdata_t
|
||||||
|
@ -97,10 +96,7 @@
|
||||||
fixed4 frag(v2f IN) : SV_Target
|
fixed4 frag(v2f IN) : SV_Target
|
||||||
{
|
{
|
||||||
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
|
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
|
||||||
|
|
||||||
#ifdef UNITY_UI_CLIP_RECT
|
|
||||||
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
|
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef UNITY_UI_ALPHACLIP
|
#ifdef UNITY_UI_ALPHACLIP
|
||||||
clip (color.a - 0.001);
|
clip (color.a - 0.001);
|
||||||
|
|
Loading…
Reference in New Issue