|
Flash CS4 Resources |
Introduction to working with Pixel Bender shadersAdobe Pixel Bender is a programming language that is used to create or manipulate image content. Using Pixel Bender you create a kernel, also known in this document as a shader. The shader defines a single function that executes on each of the pixels of an image individually. The result of each call to the function is the output color at that pixel coordinate in the image. Input images and parameter values can be specified to customize the operation. In a single execution of a shader, input and parameter values are constant. The only thing that varies is the coordinate of the pixel whose color is the result of the function call. Where possible, the shader function is called for multiple output pixel coordinates in parallel. This improves shader performance and can provide high-performance processing. In Flash Player and Adobe AIR, three types of effects can be easily created using a shader:
A shader can also be executed in stand-alone mode. Using stand-alone mode a shader’s result is accessed directly rather than pre-specifying its intended use. The result can be accessed as image data or as binary or number data. The data need not be image data at all. In this way you can give a shader a set of data as an input. The shader processes the data, and you can access the result data returned by the shader. Note: Pixel Bender support is available starting in Flash Player
10 and Adobe AIR 1.5.
|