thebookofshaders/glossary/uniform/README.md

16 lines
491 B
Markdown
Raw Normal View History

2015-05-01 20:05:55 +00:00
## Uniform
Uniform variable qualifier.
2015-05-01 20:05:55 +00:00
### Example
```glsl
uniform vec4 direction;
```
2015-06-12 16:02:51 +00:00
### Description
```uniform``` variables contain read-only data shared from WebGL/OpenGL environment to a vertex or fragment shader.
The value is per primitive, so is useful for variables which remain constant along a primitive, frame or scene.
2015-06-12 16:02:51 +00:00
### See Also
[attribute](/glossary/?search=attribute), [const](/glossary/?search=const), [varying](/glossary/?search=varying), [Chapter 03: Uniforms](/03/)