thebookofshaders/glossary/attribute
2016-04-06 11:44:45 -04:00
..
README.md folder structure for glossary 2016-04-06 11:44:45 -04:00

Attribute

Vertex attribute data.

Example

attribute vec4 v_color;

Description

attribute read-only variables containing data shared from WebGL/OpenGL environment to the vertex shader.

Because the vertex shader is executed one time for each vertex, attributes are specify per vertex data typically with information such as: space position, color, normal direction and texture coordinates of a vertex.

See Also

const, uniform, varying, Chapter 03: Uniforms