diff options
| author | Jules Laplace <jules@okfoc.us> | 2016-04-10 11:16:29 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2016-04-10 11:16:29 -0400 |
| commit | b1ce05901e15b7859f33b46c21e92755a622ea3d (patch) | |
| tree | 04bfa7a957ba0bc54ee5672aa9e655f56dbc16f9 /doc/shaders/util.txt | |
| parent | a396ed84ead4d55a6edd57731205db6274740439 (diff) | |
split up sample canvas and brush shaders
Diffstat (limited to 'doc/shaders/util.txt')
| -rw-r--r-- | doc/shaders/util.txt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/shaders/util.txt b/doc/shaders/util.txt new file mode 100644 index 0000000..d192652 --- /dev/null +++ b/doc/shaders/util.txt @@ -0,0 +1,25 @@ +SHADER UTILITIES +================ + +These are little snippets which may be useful in writing your own shaders. + + + +>> basic way to slow the frame rate of a shader. + +window.zz=window.zz||0 +if(!(x+y)) zz++ +if (lex.bg != 1 && !(zz % 4)) { + ... +} + + +>> handy for brushes - use color to mask brush shape + +lex.opacity = lex.bg == colors.black ? 0 : 1 + + +Tip: Set to "animate brush", then use option+shift (alt+shift) to +copy color from the canvas. Brush will have the "shape" of the +copied color only. Can be a cool effect when used with fg/bg only. + |
