Tessellates and splits a triangle or square in webGL