File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
1010### Added
1111- Low resolution control
12+ - Shorthand aliases for code golfing
1213
1314### Changed
1415- Mouse position is only updated when pressing down
Original file line number Diff line number Diff line change @@ -49,6 +49,14 @@ They must write on the `vec4 out_color` output to produce a color.
4949
5050The compatibility is currently set to ` 300 es ` .
5151
52+ ### Shorthand aliases
53+
54+ - ` P ` : ` gl_FragCoord.xy `
55+ - ` O ` : ` out_color `
56+ - ` T ` : ` time `
57+ - ` R ` : ` resolution `
58+ - ` M ` : ` mouse `
59+
5260## Live controls
5361
5462To expose controls to the web UI, declare a uniform in your fragment shader.
Original file line number Diff line number Diff line change 1717 uniform float time;
1818 uniform vec2 resolution;
1919 uniform vec2 mouse;
20+
21+ #define P gl_FragCoord.xy
22+ #define O out_color
23+ #define T time
24+ #define R resolution
25+ #define M mouse
2026 """
2127)
2228
You can’t perform that action at this time.
0 commit comments