简体   繁体   English

可以传递给 ios 中着色器的统一数组的最大大小是多少?

[英]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.这应该返回“顶点着色器的统一变量存储中可以保存的四元素浮点、整数或布尔向量的最大数量。该值必须至少为 128。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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