I tried to dig into OpenGL a bit to use in 2D games (mainly because of shaders). There are multiple tutorials out there showcasing how to display and blend textures, and that's fine. But i haven't found a single one that would teach how to display multiple textures at once. Now, I know that one of the popular methods is using a texture atlas and then, provided you have a well-done atlas, it's just a matter of assigning proper UVs to objects using the texture in vertices sent to a buffer array. However, how would one go about it if he didn't want to use a texture atlas. Modern OpenGL offers at least 70something texture units if my memory serves me right, that's something, but then you would have to bind different textures (and possibly end up with an outrageous amount of samplers) which would waste a lot of GPU's computing power. Let's consider the following screen, assuming that everything, including clouds, is a separate object using it's own texture
How, in pseudocode, should I handle displaying that "the proper way" without a texture atlas to get an effect like that? I experimented with rebinding textures etc. but none of that helped. Also, how shaders should look like because i don't think that having a sampler for every object is a way to go as well. Maybe something with a TEXTURE_2D_ARRAY, but if yes then how to use it properly? Again, what I'm looking at is just a list of steps i need to take to get an image like that written in a pseudocode. Thanks in advance!