I am working on a procedurally generated terrain simulator using the marching cubes algorithm and simplex noise. The problem with my current program is that it assigns a value to each vertex and generates triangles one at a time. After doing some research, I decided that using Compute Shaders(One for assigning values to each vertex using simplex noise, and one for creating the triangle mesh) will significantly increase the performance. I have a very basic idea as to how I want the shader to interact with my program but I have no clue how to make it.
UseNoiseComputeShader();//get output of ComputeShader.
output = noiseOutput;
UseMeshComputeShader(output);//get output of ComputeShader.
float[] vertices = outputMesh;
//output vertices to VAO and draw
I have seen some people use Compute Shaders for similar projects online but they were using Unity and HLSL so I was wondering if it was at all possible using OpenGL and GLSL.