|
Flash CS4 Resources |
Specifying shader input and parameter valuesMany Pixel Bender shaders are defined to use one or more input images that are used in the shader processing. For example, it’s common for a shader to accept a source image and output that image with a particular effect applied to it. Depending on how the shader is used the input value may be specified automatically or you may need to explicitly provide a value. Similarly, many shaders specify parameters that are used to customize the output of the shader. You must also explicitly set a value for each parameter before using the shader. You use the Shader object’s data property to set shader inputs and parameters and to determine whether a particular shader expects inputs or parameters. The data property is a ShaderData instance. |