 #undef V_GRADIENT_ADDRESS
 #undef V_CENTER
 #undef V_START_RADIUS
-#undef V_END_RADIUS
+#undef V_RADIUS_SCALE
 #undef V_REPEATED_SIZE
 #undef V_GRADIENT_REPEAT
 #undef V_POS


#define V_CENTER            flat_varying_vec4_0.xy
#define V_START_RADIUS      flat_varying_vec4_0.z
#define V_END_RADIUS        flat_varying_vec4_0.w

#define V_REPEATED_SIZE     flat_varying_vec4_1.xy
#define V_GRADIENT_REPEAT   flat_varying_vec4_1.z

    vec2 pos = mod(V_POS, V_REPEATED_SIZE);
#endif

    // Solve for t in length(pd) = V_START_RADIUS + t * rd
    vec2 pd = pos - V_CENTER;
    float offset = (length(pd) - V_START_RADIUS) * V_RADIUS_SCALE;

    vec4 color = sample_gradient(V_GRADIENT_ADDRESS,
                                 offset,
