Declaring constants instead of literals in vertex shader. Standard practice, or needless rigor?
问题 In a vertex shader , there is of course a limited amount of uniform storage allowed, and it is my understanding that different systems may implement GLSL in slightly different ways in terms of compiling code. I've heard the recommendation to use constants instead of writing out literals in the vertex shader code. For instance, the following code could supposedly result in a reduction in available uniform storage. (I don't quite understand how.) Example 1: With literals vec4 myVector = vec4(1