rewrite the edge generator, and ditch the flat rendering