0
votes

I can't seem to find it if it exists. I've run into a problem with uniform buffers where the gl spec gives a minimum size of only 1024 locations. Is there a set minumum to the number of locations i can reference in a shader for an SSBO? For instance, if I wanted to be able to access 10,000 mat4s?

Also, on current modern hardware, is there a significant performance difference between using an SSBO vs using vertex buffers?

How would using SSBOs, VBOs or geometry shaders roughly compare? (This in context of storing/expanding vertices). I'll profile it if there isn't a general case answer.

1
Are you mixing up "SSBO Size" with "number of uniform locations"? I don't think they are directly related.BDL
@BDL I'm referring to the amount of information I have access to from a shader.Roelin Heart

1 Answers

0
votes

The maximum shader storage block size can be get by

GLint64 size;
glGetInteger64v(GL_MAX_SHADER_STORAGE_BLOCK_SIZE, &size) 

The minimum value for the shader storage block size, which is guaranteed by the specification, is 2^27 (128MB).

See OpenGL 4.6 API Core Profile Specification - State Tables respectively Shader Storage Buffer Object