ctly increasing as we
            // move away from the center.
            half2 fragDirection = half2(sign(translatedFragPosFloat));
            translatedFragPosFloat = abs(translatedFragPosFloat);

            // Our goal is to snip out the "middle section" of the proxy rect (everything but the
            // edge). We've repositioned our fragment position so that (0, 0) is the centerpoint
            // and x/y are always positive, so we can subtract here and interpret negative results
            // as being within the middle section.
            half2 translatedFragPosHalf = half2(translatedFragPosFloat - (proxyCenter - edgeSize));

            // Remove the middle section by clamping to zero.
            translatedFragPosHalf = max(translatedFragPosHalf, 0);

            // Reapply the fragment's sign, so that negative coordinates once again mean left/top
            // side and positive means bottom/right side.
            translatedFragPosHalf *= fragDirection;

            // Offset the fragment so that (0, 0) marks the upper-left again, instead of the center
            // point.
            translatedFragPosHalf += half2(edgeSize);

            half2 proxyDims = half2(2.0 * edgeSize);
            half2 texCoord = translatedFragPosHalf / proxyDims;

            return inColor * ninePatchFP.eval(texCoord).a;
        }
    