Hey folks, I’m a beginner when it comes to graphics programming, so I realize I might be asking the wrong question, but…
The docs say:
Uniforms are best for pushing small amounts of data. If you are pushing more than a matrix or two per call you should consider using a storage buffer instead.
I would like to know more about the technical reasons for this, as well as the actual size thresholds for this. A “matrix or two” is 128 bytes, right? So is anything more than that supposed to be passed via a storage buffer? What exactly will happen if I pass larger amount of data? E.g. I want a view, projection, inverse view and inverse projection matrices available in my shaders.
Another example: if I have an array of light data (colors/positions/directions/attenuations/etc.), should that already go the storage buffer route? (I assume yes, since they aren’t even changing that often).
Also, I was thinking it’s related to Vulkan push constants (which I don’t have much experience with either), which have the size limit, but looking at the sdl source code, I’m not seeing they being used for pushing vertex/fragment uniform data.
In general, some more clarity on this topic would be greatly appreciated!