vvilp
vvilp

Reputation: 423

GLSL, Shader has some array limit?

I create 1000 size vec3 array, but it shows nothing on glut window when I resize the array to 128. it will show I think it has some limit on my Graphic card.

what can I do to avoid this limit?

uniform vec3 cir[128]; // can show something

uniform vec3 cir[1000]; // shows nothing

I need pass at least 500 cir to shader.

Upvotes: 2

Views: 1611

Answers (1)

Yno
Yno

Reputation: 776

Uniforms have been extended tu support large arrays through GL_ARB_uniform_buffer_object. If you can't afford to use this extension you might consider using a one-dimensional texture instead.

Upvotes: 4

Related Questions