aqsl (“axel”) is the Aqsis shader compiler.
One of the central features of the RenderMan Interface is the ability to describe materials, light sources and even the shapes of objects in terms of separate, user-defined shaders. A shader is a small program written in the RenderMan Shading Language, RSL or SL for short. The fact that shaders are arbitrary programs gives an extreme versatility which has been a major contributing factor in the popularity of RenderMan as a standard for producing computer-generated images.
SL shaders are written as text files in a C-like syntax suitable for humans to
read and write; the shader compiler checks these programs for correctness and
translates them for use by the renderer. The output
.slx files produced by
aqsl are text, but in a regular syntax suitable for execution by the renderer
using a stack-based virtual machine.
The typical way of invoking the shader compiler is by simply giving the name of an SL source file as the only argument:
This will compile the shader, saving the result in a file,
aqsl has several options, a summary of which can be obtained using
Usage: aqsl [options] <filename> -o %s specify output filename -i%s Set path for #include files. -I%s Set path for #include files. -DSym[=value] define symbol <string> to have value <value> (default: 1). -USym Undefine an initial symbol. -backend %s Compiler backend (default slx). Possibilities include "slx" or "dot": slx - produce a compiled shader (in the aqsis shader VM stack language) dot - make a graphviz visualization of the parse tree (useful for debugging only). -h, -help Print this help and exit -version Print version information and exit -nc, -nocolor Disable colored output -d dump sl data -v, -verbose=integer Set log output level 0 = errors 1 = warnings (default) 2 = information 3 = debug
#includepreprocessor directive to pull content (such as additional function definitions) from external files. These options add a directory to the search path for the
some_symbol, and give it a value of
value, or 1 if value is omitted.
backend_name. Currently available backends include
dot, of which
slxis the default and produces programs in a format readable by the aqsis shader virtual machine.
dotis a debugging backend used to produce a graphviz graph of the internal abstract syntax tree generated from a shader (this isn’t useful for the end user).