Maximum Uniforms Count

Hi, I have a quick question;
I’m trying to set 2 uniform int arrays of 512 in length but this is stopping me:
uniforms count exceeds MAX_FRAGMENT_UNIFORM_VECTORS(1024)
Is there a way to change this maximum or is it very important?

The max is a hardware limitation you wont be able to workaround. Maybe you could store your info in a texture.

Oh. Looks like that’s a dead end.
I thought of making it a texture but I figured I would run into sampling problems because they are integers, and the same arrays are going to be used on the CPU as well.

We use textures for quite a few parts in babylon like weigh matrices and so on for bones so it should be possible.


I’ll try converting it to a texture for now and see what happens. thanks.

1 Like

The texture method is fully working thanks :smile:
I used the RawTexture feature.