1

I'm quite new to OpenGL ES but I'm trying to render multiple 2D images on the screen at once (uniform sampler2D and texImage2D, ...) however when I try to render more than 16 textures at once I get:

The number of fragment samplers (21) is greater than the maximum number allowed (16).

which I've learned from here and by looking at this there's a hard limit to the number of textures I can bind at once. However, for my particular application, I need to render about ~30 images at once. Is there any workaround and is there any particular way I can render that many images?

Edit: Combining several images into one big image doesn't work very well in my case.

SSBakh
  • 1,487
  • 1
  • 14
  • 27
  • 1
    "*I need to render about ~30 images at once.*" What is your fragment shader actually doing that you need to index so many images in the same draw call? – Nicol Bolas Sep 15 '20 at 13:32

1 Answers1

0

The only bypass I know is to put multiple images in one and bind this large texture and extract this images via texture coordinates.

phil
  • 21
  • 3