asciiblaster

- draw irc art in your web browser
git clone git://git.acid.vegas/asciiblaster.git
Log | Files | Refs | Archive | README

util.txt (688B)

      1 SHADER UTILITIES
      2 ================
      3 
      4 These are little snippets which may be useful in writing your own shaders.
      5 
      6 
      7 
      8 >> basic way to slow the frame rate of a shader.
      9 
     10 window.zz=window.zz||0
     11 if(!(x+y)) zz++
     12 if (lex.bg != 1 && !(zz % 4)) {
     13   ...
     14 }
     15 
     16 
     17 >> handy for brushes - use color to mask brush shape
     18 
     19 lex.opacity = lex.bg == colors.black ? 0 : 1
     20 
     21 
     22 Tip: Set to "animate brush", then use option+shift (alt+shift) to
     23 copy color from the canvas. Brush will have the "shape" of the
     24 copied color only.  Can be a cool effect when used with fg/bg only.
     25 
     26 
     27 
     28 >> copy color from canvas at x/y
     29 
     30 lex.assign( canvas.get(x,y) )
     31 
     32 
     33 
     34 >> animate canvas up and to the left..
     35 
     36 lex.assign( canvas.get(x+1,y+1) )
     37 
     38