Do GLSL uniform blocks consume components?

血红的双手。 提交于 2019-12-11 10:08:33

问题


If I use uniform blocks in a GLSL shader - do they consume components (from GL_MAX_VERTEX_UNIFORM_COMPONENTS or GL_MAX_FRAGMENT_UNIFORM_COMPONENTS).


回答1:


Yes. See ARB_Uniform_Buffer_Object:

The amount of storage available for uniform variables in the default uniform block accessed by a vertex shader is specified by the value of the implementation-dependent constant MAX_VERTEX_UNIFORM_COMPONENTS. The total amount of combined storage available for uniform variables in all uniform blocks accessed by a vertex shader (including the default uniform block) is specified by the value of the implementation-dependent constant MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS. These values represent the numbers of individual floating-point, integer, or boolean values that can be held in uniform variable storage for a vertex shader.



来源:https://stackoverflow.com/questions/25017625/do-glsl-uniform-blocks-consume-components

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!