Reputation: 9540
I am trying to decide whether to use a uniform array or an SSBO for a shader I am working on.
I suspect I will need up to a maximum of a thousand textures and up to a thousand vec4 locations.
Would a uniform be able to handle this much data or should I switch to SSBOS?
Upvotes: 3
Views: 3304
Reputation: 10122
The OpenGL spec guarantees that UBOs can be up to 16KB in size (implementations can allow them to be bigger) and that SSBOs can be up to 128MB. Most implementations will let you use SSBOs sized up to the limits of GPU memory.
Personally I'd go with the above guaranteed limits when deciding rather than querying the implementation.
Upvotes: 4