91
91
// Get the anti-aliased and resolution independent shape mask using distance fields.
92
92
lowp float distanceMin = abs(dist) * -distanceAA + 0.5;
93
93
lowp float distanceMax = abs(dist) * distanceAA + 0.5;
95
96
// Get the shadow color outside of the shape mask.
96
97
lowp float shadow = (shapeData.b * -mask) + shapeData.b; // -ab + a = a(1 - b)
97
98
// Mask the current color then blend the shadow over the resulting color. We simply use