
5. The GLSL Shader Interfaces 81
the blocks based on the feature capabilities that output the interface. With vary-
ing variables, we need to cope with a finer level of granularity and assign variables
with locations having semantics of position, light direction, normal, tangent, texture
coordinates, etc.
Tip
– Using separated programs, sorting, and semantics reduces the amount of binding.
5.5.5 Uniform Buffers and Uniform Blocks
Uniform buffers and uniform blocks were introduced in OpenGL 3.1. They offer
a great replacement to uniform variables, especially for semantics-based software de-
sign. Using uniform variables, we have no other choice than letting ...