Real-Time 3D Graphics with WebGL 2
上QQ阅读APP看书,第一时间看更新

Uniforms

Uniforms are input variables that are available to both the vertex shader and the fragment shader. Unlike attributes, uniforms are constant during a rendering cycle. For example, the position of a light is often modeled as a uniform. Uniforms are effectively global variables that you set before executing your shader program.