Add per material batch support to polygons.