no all data are generated by compute shader (CS)!
But CS writes wrongly vec3 data (only float, vec2 and vec4 work correctly). I got similar broken meshes with vec3 vertex arrays. From the neighboring topic
"for this simple shader
const CSs = `#version 310 es
layout (local_size_x = 2, local_size_y = 2, local_size_z = 1) in;
layout (std430, binding = 0) buffer SSBO {
vec3 data[];
} ssbo;
void main() {
ssbo.data[gl_LocalInvocationIndex] = vec3(gl_LocalInvocationID);
}
`;
I get strange result - output: [0,0,0, 0,1,0, 0,0,0, 1,0,0] (I inserted spaces by hand)" me and
"I suppose this is because of memory layout. An array of vec3 is rounded up to 4N even though std430.
If you allocate and get result with new Float32Array(4 * 4) by bufferData()/getBufferSubData(), you will get correct result - output: [0,0,0,(0), 1,0,0,(0), 0,1,0,(0), 1,1,0,(0)], (0) means auto inserted padding. The result you showed is first 12 components of this." Kentaro Kawakatsu.
May be "this is because of memory layout" again but complicated by f16.
and I think we needn't any library now. Let simple CS convert f32 <-> f16 data (at least for experiments) meanwhile we get Float16Array.
I'll try to make simple tests for writing into f16 buffers (Uint16Array 8-)
Evgeny