I have a C++ and GLSL code that computes Marching Cubes. It's slow as hell, and the biggest problem is that it calculates the right number of triangles, but not the right vertices.
The C++ code is large, and it's at: https://github.com/sjhalayka/julia4d3/blob/a933ca3d2a7129db93140d858c9ecf24f55f43af/js_state_machine.h#L236
The GLSL code is also large, and it's at: https://github.com/sjhalayka/julia4d3/blob/a933ca3d2a7129db93140d858c9ecf24f55f43af/Release/mc.cs.glsl#L1
When I read the output data, it tells me the right number of triangles, but the rest of the output data is like, overwritten with zeros. Am I making some kind of silly mistake? :(