If you select the hand tool in the tool box you can right click the image and get another little goody - effects/program.
This lets you create your own programs to use inside Chasey.
By issuing simple instructions to the Chasys Draw IES Artist GraphAsm Interpreter, you can write short programs to implement your own custom visual effects.
GraphAsm supports both math operations and more powerful graphical commands like interpolation to give you the power to squeeze as much juice as possible into your macros. Can things get better than that?
********************************************
General Programming Rules
All GraphAsm statements should end with a semi-colon. ;
Comments should begin with //; the whole line will be treated like a comment.
Most GraphAsm instructions take this form:
instruction dest, value1, value2;
dest is the destination, it must be one of the predefined variables.
value1 and value2 may be variables or numbers, depending on what the instruction does.
To specify a number, use a hash # followed by the numeral. There should be no spaces between the # and the numerals. GraphAsm does not accept decimals. To work with fractional values, use fixed point math with the shift instructions.
#1234 // correct
#-147 // correct
# 77 // wrong - spacing
# -1 // wrong - spacing
#1.9 // wrong - decimal
Please note that you can't use a numeral as a destination; it is not logical to do so. For example, the following statement is wrong:
add #123, red, blue; // wrong
The correct form would be:
add red, #123, blue; // correct
or
add _a, red, blue; // correct
Your program will be executed for each pixel in the image, starting at the top left corner. Keep that in mind.
GraphAsm Variables
The following are preset color variables. On entry, they specify the color of the current pixel. On exit, they specify the color the pixel should be set to by the interpreter. They are:
blue green red alpha
The following are preset location variables. On entry, they specify the location of the current pixel. They are not checked on exit. They are:
_x _y //note the underscores
The following are general variables, use them for anything you please.
_a _b _c _d _e _f _g _h _i _j
GraphAsm Commands
The following are the commands that you use with GraphAsm:
EXIT - exit the program
Usage: exit;
ADD - adds two variables
Usage: add dest var1 var2;
SUBTRACT - subtracts var2 from var1
Usage: subtract dest var1 var2;
MULTIPLY - multiplies var1 by var2
Usage: multiply dest var1 var2;
DIVIDE - divides var1 by var2
Usage: divide dest var1 var2;
MODULUS - divides var1 by var2, placing the remainder, not the answer, in destination
Usage: modulus dest var1 var2;
SHIFT_LEFT - left-shifts var1 by var2
Usage: shift_left dest var1 var2;
SHIFT_RIGHT - right-shifts var1 by var2
Usage: shift_left dest var1 var2;
AND - performs a logical AND on var1 and var2
Usage: and dest var1 var2;
OR - performs a logical OR on var1 and var2
Usage: or dest var1 var2;
XOR - performs a logical XOR on var1 and var2
Usage: xor dest var1 var2;
NOT - performs a logical NOT on src
Usage: not dest src;
MIX - performs an interpolation between var1 and var2. The value of factor on entry is the weight of var1 relative to 1000. On exit it contains the result.
Usage: mix factor var1 var2;
COPY - copies the contents of src to dest
Usage: copy dest src;
SWAP - swaps the contents of var1 and dest
Usage: swap var1 var2;
LOAD_PIXEL - loads a pixel into the predefined variables red, green, blue, and alpha.
Usage: load_pixel x-pos y-pos;
COMPARE_EQUAL - sets dest to 1 if var1 is equal to var2.
Usage: compare_equal dest var1 var2;
COMPARE_LESS - sets dest to 1 if var1 is less than var2.
Usage: compare_less dest var1 var2;
COMPARE_MORE - sets dest to 1 if var1 is more than var2.
Usage: compare_more dest var1 var2;
LABEL - used to mark points in a program.
Usage: label number; e.g. // label #2;
GOTO - used to jump to a labelled location.
Usage: goto label_number; e.g. // goto #2;
GOTOIF - used to jump to a labelled location if var is not zero.
Usage: gotoif var label_number; e.g. // gotoif red, #2;
RAND - used to genrate a random number between 0 and 32767
Usage: rand dest; e.g. // rand _a;
GraphAsm Examples
Try the following examples to get you up to speed:
//Swap RED and GREEN
swap red green;
//Morning Fog
copy _c #500;
mix _c red #192;
copy red _c;
copy _c #500;
mix _c green #192;
copy green _c;
copy _c #500;
mix _c blue #224;
copy blue _c;
//Random noise mask
rand _a;
and red _a #255;
rand _a;
and green _a #255;
rand _a;
and blue _a #255;
Almost like a filter assembler within the program.Pretty cool and something i will have to learn more about.
Looks pretty interesting.