mirror of
https://github.com/patriciogonzalezvivo/thebookofshaders
synced 2024-11-08 01:10:27 +00:00
8 lines
452 B
Markdown
8 lines
452 B
Markdown
|
Learn how to use Uniform variables. Uniform variables, or simply *uniforms* are the variables that carry information equally accessible from all of the threads of your shader. The [GSLS editor](http://editor.thebookofshaders.com/) has three uniforms set up for you.
|
||
|
|
||
|
```glsl
|
||
|
uniform vec2 u_resolution; // Canvas size (width,height)
|
||
|
uniform vec2 u_mouse; // mouse position in screen pixels
|
||
|
uniform float u_time; // Time in seconds since load
|
||
|
```
|