I am trying to create a height map painted with a face, not a vertex. For example, this is what I have now:
But this is what I want: 
I read that I need to split each vertex into several vertices, and then index each separately for triangles. I also know that a blender has such a function for its models (split vertices or something?), But I'm not sure which algorithm I will follow. This would be a last resort, because multiplying the number of vertices in a grid without any reason other than color does not seem effective.
I also discovered something called flatshading (using the flat qualifier for pixel color in shaders), but it seems to draw squares instead of triangles. Is there a way to make triangles of a triangle?

For reference, this is my current vertex generation code:
public class HeightMap extends GameModel { private static final float START_X = -0.5f; private static final float START_Z = -0.5f; private static final float REFLECTANCE = .1f; public HeightMap(float minY, float maxY, float persistence, int width, int height, float spikeness) { super(createMesh(minY, maxY, persistence, width, height, spikeness), REFLECTANCE); } protected static Mesh createMesh(final float minY, final float maxY, final float persistence, final int width, final int height, float spikeness) { SimplexNoise noise = new SimplexNoise(128, persistence, 2);
Edit
I tried to do a couple of things. I tried to rearrange the flat-shaded indexes, but that didn't give me the look I wanted. I tried using uniform vec3 colors and indexed it with gl_VertexID or gl_InstanceID (I'm not quite sure of the difference), but I could not collect arrays. Here is a github repo, by the way.