std140 Uniform Buffer Layout
This appendix describes the layout of the members of a uniform buffer object when the layout is specified with the layout modifier
std140. It has the following major sections:
std140 Layout Qualifier
Generally, when you group a number of uniform variables in a uniform buffer object, you need to query the offset (and format and type, if you don’t know those values from the shader source). For large collections of uniforms, this process can result in needed to make many queries. The
std140 layout qualifier requests that the GLSL shader compiler organize the variables in uniform block according to a set of rules, ...