Important concepts and terms

The following reference list contains important terms that you will encounter in this chapter:

  • Kernel: For Pixel Bender, a kernel is the same thing as a shader. Using Pixel Bender your code defines a kernel, which defines a single function that executes on each of the pixels of an image individually.

  • Pixel Bender bytecode: When a Pixel Bender kernel is compiled it is transformed into Pixel Bender bytecode. The bytecode is accessed and executed by Flash Player or Adobe AIR at run time.

  • Pixel Bender language: The programming language used to create a Pixel Bender kernel.

  • Pixel Bender Toolkit: The application that is used to create a Pixel Bender bytecode file from Pixel Bender source code. The toolkit allows you to write, test, and compile Pixel Bender source code.

  • Shader: For the purposes of this document, a shader is a set of functionality written in the Pixel Bender language. A shader’s code creates a visual effect or performs a calculation. In either case, the shader returns a set of data (usually the pixels of an image). The shader performs the same operation on each data point, with the only difference being the coordinates of the output pixel.

    The shader is not written in ActionScript. It is written in the Pixel Bender language and compiled into Pixel Bender bytecode. It can be embedded into a SWF file at compile time or loaded as an external file at run time. In either case it is accessed in ActionScript by creating a Shader object and linking that object to the shader bytecode.

  • Shader input: A complex input, usually bitmap image data, that is provided to a shader to use in its calculations. For each input variable defined in a shader, a single value (that is, a single image or set of binary data) is used for the entire execution of the shader.

  • Shader parameter: A single value (or limited set of values) that is provided to a shader to use in its calculations. Each parameter value is defined for a single shader execution, and the same value is used throughout the shader execution.