2011

Table Of Contents
Additional images (if any) follow the same convention: for an additional
input image Bg, the corresponding arguments to main would be:
input varying float rBg
input varying float gBg
input varying float bBg
input varying float aBg
4 parameters of the main() function must be present to define the output
pixel color. They correspond to the RGBA channels of the output pixel.
They must be of type float, and must be qualified as output varying. The
name of these parameters must be the component letter in lower case
concatenated with the literal string Out:
output varying float rOut
output varying float gOut
output varying float bOut
output varying float aOut
1 parameter of the main function must be present for each input parameter.
They must be the same name and type as the parameter of the UI. Ex:
input uniform float P1
The following is a sample script and procedure that blends two images.
To blend two images:
1 Connect a CTL tool node into an output node in the Schematic view.
2 Connect image 1 to the In input of the CTL tool.
3 Create a second input for the CTL tool by right-clicking on the node and
selecting Add input from the menu.
4 Name the new input Img1 when prompted.
5 Connect a second image to Img1 input.
6 Select the CTL tool node and click the Edit button to open the Composite
internal editor.
464 | Chapter 18 Pixel Expressions