thebookofshaders/glossary/varying/README.md

16 lines
513 B
Markdown
Raw Normal View History

2015-06-12 16:02:51 +00:00
## Varying
Varying variable qualifier.
2015-06-12 16:02:51 +00:00
### Example
```glsl
varying vec3 position;
```
2015-06-12 16:02:51 +00:00
### Description
```varying``` variables contain data shared from a vertex shader to a fragment shader.
The variable must be written in the vertex shader and the read-only value in the fragment shader is then interpolated from the vertices which make up the fragment.
2015-06-12 16:02:51 +00:00
2017-08-19 10:11:58 +00:00
### See Also
[attribute](/glossary/?search=attribute), [const](/glossary/?search=const), [uniform](/glossary/?search=uniform), [Chapter 03: Uniforms](/03/)