I've been able to set up a SSBO (storage shader buffer object) and use it in both a compute and fragment shaders.
Moreover, I would like to use it directly in a vertex shader :
layout(std140, binding = 3) buffer destBuffer { mediump float data[]; };
However, I get an error message :
The number of vertex shader storage blocks (1) is greater than the maximum number allowed (0)
Is it possible to fix this ?
If not, is there a way to prodive data modified in a compute shader to a vertex shader.
Thank you.
Yup, the 64KB limit tends to be the problem here.
Plan B - allocate half-float Nx*Ny texture, and write to it using imageStore() in the compute shader, and sample from it using a texture() sampler in the vertex shader.
Ok, but I'm not used to use textures,
Can you point me a good reference for this ?