0

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.

HolyBlackCat
  • 78,603
  • 9
  • 131
  • 207

1 Answers1

0

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

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982
Rabbid76
  • 202,892
  • 27
  • 131
  • 174