Installing PBDT

You can install PBDT just like any Eclipse plug-in via an update site. The location of the update site:


Setup your preferences

Go into the Eclipse preferences and search for the PBDT category. You are able to tweak some default variables and choose the location of the PixelBender Toolkit.

Create a new project

With FDT richt-click into the Flash Explorer and choose New > Project. Create a new Flash Project. PBDT works very well with FDT and FlexBuilder. In this tutorial I will continue using FDT.

Add the PBDT nature

Right-click on the created project and choose Add/Remove PixelBender Nature. That way the PBDT plug-in will get involved into the build process of your Flash project.

Compiler preferences

Right-click on the created project and choose Properties. You have now a new properties page called PixelBender. You can change the location of the compiled shaders in the project properties.

Create a new shader

Next we will create a new shader. Right-click on the project and choose New > Other. Scroll down until you find the PixelBender category and select PixelBender Kernel.

You can now select the location of the new kernel and fill out the default parameters. The default parameters will be adopted from the preferences.

The PixelBender kernel editor

Now that you have created a shader it will open up in the PixelBender kernel editor. Note also that the kernel has also been compiled into the pbj output directory already. Everytime you save a kernel it will be compiled into that directory.

Create a new parameter

Next choose a spot in the editor where you want to create a new parameter.Simply press Ctrl + Space and choose the createParameter proposal. Now you can step comfortably through all the fields using the TAB key and fill them out.

The auto-completion will also work at different positions. The newly created “scale” parameter can be inserted into the code by simply pressing Ctrl + Space somewhere in the evaluatePixel method.

Errors in your code will be shown everytime you save. A kernel that has errors does not get compiled into the output directory.


Now you are set. You can create an ActionScript file that works with the shader. The workflow is simple. You edit the kernel, save it and launch your Flash application. Happy pixel-bending :o)