I am currently doing this rendering in OpenGL 4.3, using UBOs to store all of my persistent data on the GPU. (Material as a description of the material, matrix, ...). It works, however, the small size of UBO (64kB on my implementation) forces me to switch buffers many times slowing down the rendering, I am looking for a similar way to store several megabytes.
After a little research, I saw that SSBO does just that, but it also has unwanted “features”: they can be written from a shader and can be slower to read.
Is there a better solution than SSBO for feeding large blocks of data to shaders? I feel like I'm missing something, why is UBO limited to a few kB, while there is a more flexible solution that can handle much more data? If shader storage buffers are what I'm looking for, is there a way to make sure they are not changed by shaders?
source
share