简体   繁体   中英

What is the maximum size of a uniform array that can be passed to a shader in ios?

I am using instanced rendering by passing an array of model view matrices. What is the maximum array size possible for a particular uniform?

This value will vary by hardware and implementation. I believe that

int maxUniformVectors;
glGet(GL_MAX_VERTEX_UNIFORM_VECTORS, &maxUniformVectors);

should answer your question.

From the docs :

This should return "the maximum number of four-element floating-point, integer, or boolean vectors that can be held in uniform variable storage for a vertex shader. The value must be at least 128.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM