Sprite atlas, instancing and uniform buffer size

:sweat_smile:
The post, remove the extra space character -

But aren’t texture arrays unsupported on some platforms? I’m not completely sure, if I want to port my game on other platforms in future, I don’t want to be blocked by this.

After a few minutes of thinking
Maybe I can rewrite my renderer for these platforms to use atlas, ok. But how big can be my sampler array (uniform sampler2D samplers[NUM];, I guess)? Can I store them all inside SSBO?

SSBO
Wiki (Shader_Storage_Buffer_Object#OpenGL_usage) says how to setup it, but for me it wasn’t completely clear ho to access that data from inside shader (I’m noob, may be it obvious for everyone else), but if someone want to know:
wiki example

layout(std430, binding = 3) buffer layoutName
{
    int data_SSBO[];
};

Change to

layout(std430, binding = 3) buffer layoutName
{
    int data_SSBO[];
} ssboData;

and access it like ssboData.data_SSBO[123].