uniform lowp vec4 uColor;
uniform lowp vec3 mixColor;
-#if !defined(IS_REQUIRED_BLUR) && defined(IS_REQUIRED_BORDERLINE)
+#ifdef IS_REQUIRED_BLUR
+uniform mediump float blurRadius;
+#elif defined(IS_REQUIRED_BORDERLINE)
uniform mediump float borderlineWidth;
uniform mediump float borderlineOffset;
uniform lowp vec4 borderlineColor;
uniform lowp vec4 uActorColor;
#endif
-#ifdef IS_REQUIRED_BLUR
-uniform mediump float blurRadius;
-#endif
#if defined(IS_REQUIRED_ROUNDED_CORNER) || defined(IS_REQUIRED_BORDERLINE) || defined(IS_REQUIRED_BLUR)
{
gFragmentPosition = abs(vPosition) - vRectSize;
gCenterPosition = -gRadius;
-#if !defined(IS_REQUIRED_BLUR) && defined(IS_REQUIRED_BORDERLINE)
+#ifdef IS_REQUIRED_BLUR
+#elif defined(IS_REQUIRED_BORDERLINE)
gCenterPosition += borderlineWidth * (clamp(borderlineOffset, -1.0, 1.0) + 1.0) * 0.5;
#endif
gDiff = gFragmentPosition - gCenterPosition;
gMaxOutlinePotential = gRadius + gPotentialRange;
gMinOutlinePotential = gRadius - gPotentialRange;
-#if !defined(IS_REQUIRED_BLUR) && defined(IS_REQUIRED_BORDERLINE)
+#ifdef IS_REQUIRED_BLUR
+ gMaxInlinePotential = gMaxOutlinePotential;
+ gMinInlinePotential = gMinOutlinePotential;
+#elif defined(IS_REQUIRED_BORDERLINE)
gMaxInlinePotential = gMaxOutlinePotential - borderlineWidth;
gMinInlinePotential = gMinOutlinePotential - borderlineWidth;
#else
}
#endif
-#if !defined(IS_REQUIRED_BLUR) && defined(IS_REQUIRED_BORDERLINE)
+#ifdef IS_REQUIRED_BLUR
+#elif defined(IS_REQUIRED_BORDERLINE)
lowp vec4 convertBorderlineColor(lowp vec4 textureColor)
{
mediump float potential = gPotential;
}
#endif
-#if !defined(IS_REQUIRED_BLUR) && defined(IS_REQUIRED_ROUNDED_CORNER)
+#ifdef IS_REQUIRED_BLUR
+#elif defined(IS_REQUIRED_ROUNDED_CORNER)
mediump float calculateCornerOpacity()
{
mediump float potential = gPotential;
PreprocessPotential();
#endif
-#if !defined(IS_REQUIRED_BLUR) && defined(IS_REQUIRED_BORDERLINE)
+#ifdef IS_REQUIRED_BLUR
+#elif defined(IS_REQUIRED_BORDERLINE)
targetColor = convertBorderlineColor(targetColor);
#endif
OUT_COLOR = targetColor;
uniform mediump vec4 offsetSizeMode;
uniform mediump vec2 origin;
uniform mediump vec2 anchorPoint;
-#if !defined(IS_REQUIRED_BLUR) && defined(IS_REQUIRED_BORDERLINE)
-uniform mediump float borderlineWidth;
-uniform mediump float borderlineOffset;
-#endif
#ifdef IS_REQUIRED_BLUR
uniform mediump float blurRadius;
+#elif defined(IS_REQUIRED_BORDERLINE)
+uniform mediump float borderlineWidth;
+uniform mediump float borderlineOffset;
#endif
#ifdef IS_REQUIRED_ROUNDED_CORNER
uniform mediump vec4 cornerRadius;
#endif
#ifdef IS_REQUIRED_ROUNDED_CORNER
-#if !defined(IS_REQUIRED_BLUR) && defined(IS_REQUIRED_BORDERLINE)
+#ifdef IS_REQUIRED_BLUR
+ mediump float minSize = min(visualSize.x, visualSize.y);
+#elif defined(IS_REQUIRED_BORDERLINE)
mediump float minSize = min(visualSize.x, visualSize.y) + (1.0 + clamp(borderlineOffset, -1.0, 1.0)) * borderlineWidth;
#else
mediump float minSize = min(visualSize.x, visualSize.y);