Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Creative tools for business
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection / Pixel Bender Technology Center /

Animating a particle system using Pixel Bender

by Kevin Goldsmith

Kevin Goldsmith

Content

  • Setting up the Flash Builder project
  • Building the first iteration of the application
  • Creating a Pixel Bender kernel to update the position of each particle
  • Using the Pixel Bender filter to animate the particles
  • Constraining the particles in a window
  • Improving performance of the Pixel Bender shaders
  • Analyzing the completed project code
  • Where to go from here

Created

14 March 2011

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
ActionScript animation Flash Builder graphic effects MXML optimization Pixel Bender

Requirements

Prerequisite knowledge

Intermediate experience programming with ActionScript 3 to develop projects with Adobe Flash Builder, as well as experience working with Pixel Bender.

User level

Intermediate

Required products

  • Flash Builder 4 (Download trial)
  • Pixel Bender Toolkit (Macintosh)
  • Pixel Bender Toolkit (Windows)

Sample files

  • particle_system.zip (4 KB)

Although the Adobe Pixel Bender kernel language was originally designed to process image and video files, its fast, multi-threaded execution in Adobe Flash Player makes it useful for general math processing. In this tutorial you'll examine a sample project to develop a particle system. You'll learn how to encode general-purpose data for Pixel Bender with a ByteArray, process the data using the ShaderJob class in the Flash runtime, and then return the results of the data.

Setting up the Flash Builder project

To get started, create a new project and set up the related files. If you haven't already, be sure to download the sample files folder linked at the beginning of this article. Uncompress the ZIP file and place the folder in a convenient location, such as your desktop. Follow these steps to set up the project:

  1. Launch Flash Builder 4.
  2. Create a new Flex Project with the new Flex Project Wizard by choosing File > New > Flex Project. Enter the following settings:
    • In the project name field, enter ParticleSystemExercise
    • For the Application Type, choose Desktop
    • For the Flex SDK Version, choose either Flex 4.1 or Flex 4.0
    • For Server Technology, choose None/Other
  3. After applying these settings, click Finish.

The next task involves creating a folder in your project named kernels:

  1. Select the ParticleSystemExercise folder located in the Package Explorer tab.
  2. From the File menu, select New > Folder.
  3. In the Folder Name field, enter kernels.
  4. Click Finish.

To finish the setup process, create the folder that will contain the bytecode file:

  1. Select the ParticleSystemExercise folder located in the Package Explorer tab.
  2. From the File menu, select New > Folder.
  3. In the Folder Name field, enter pbjs.
  4. Click Finish.

The Flash Builder project is now ready to go. In the next section, you'll learn how to add the code to create the first version of the project.

Building the first iteration of the application

This section shows you how to update the existing code to add the project code. Follow these steps:

  1. Replace the text in the ParticleSystemExercise.mxml file with the following code:
<?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" applicationComplete="applicationCompleteHandler(event)"> <fx:Script> <![CDATA[ import mx.events.FlexEvent; private const PARTICLE_COUNT:uint = 8000; private var m_bytes:ByteArray = null; // initialize the particle system private function initializeByteArray():void { m_bytes = new ByteArray(); // must be LITTLE_ENDIAN for Pixel Bender m_bytes.endian = Endian.LITTLE_ENDIAN; // Create PARTICLE_COUNT particles and store in ByteArray for ( var i:uint=0; i<PARTICLE_COUNT; i++ ) { // Particle position - x m_bytes.writeFloat(Math.random()*particleDisplay.width); // Particle position - y m_bytes.writeFloat(Math.random()*particleDisplay.height); // particle velocity - x m_bytes.writeFloat((Math.random()*2.0)-1.0); // particle velocity - y m_bytes.writeFloat((Math.random()*2.0)-1.0); } } // draw the particle system private function draw():BitmapData { // create the BitmapData object to draw into var bd:BitmapData = new BitmapData( particleDisplay.width, particleDisplay.height, false ); bd.lock(); // lock the BitmapData for drawing // walk the ByteArray to get all the particles m_bytes.position = 0; while ( m_bytes.bytesAvailable > 0 ) { // the first two floats are the x,y of the particle // draw using a random color bd.setPixel( m_bytes.readFloat(), m_bytes.readFloat(), 0x000000 + Math.random() * 0xFFFFFF ); // skip the next two floats (1 float == 4 bytes), // they contain the velocity m_bytes.position += 8; } bd.unlock(); // unlock the BitmapData return bd; } protected function applicationCompleteHandler(event:FlexEvent):void { // initialize the particle system initializeByteArray(); // draw the particle system particleDisplay.graphics.clear(); particleDisplay.graphics.beginBitmapFill(draw()); particleDisplay.graphics.drawRect(0.0, 0.0, particleDisplay.width, particleDisplay.height); particleDisplay.graphics.endFill(); } ]]> </fx:Script> <mx:Canvas id="particleDisplay" width="100%" height="100%" /> </s:WindowedApplication>

The code shown above defines three functions, a member variable, and a constant in the <fx:script> block. The constant PARTICLE_COUNT specifies the number of particles that the application will generate. Each particle's position and velocity is stored in the ByteArray named m_bytes. The function initializeByteArray adds four float values for each particle: the x position, the y position, the x velocity, and the y velocity to the m_bytes ByteArray object.

The position is set to a random position within the control. Each velocity value is randomized to a value between –1 and 1. The draw function creates a BitmapData object and then steps through the m_bytes ByteArray object, reading the x and y position values and setting the pixel they represent to a random color.

Finally, the applicationCompleteHandler is an event handler for the applicationComplete event. The applicationCompleteHandler function initializes the m_bytes object and then uses the draw function to display the particle system. Run the ParticleSystemExercise application. You'll see something similar to Figure 1.

First iteration of the particle system application.
Figure 1. First iteration of the particle system application.

Creating a Pixel Bender kernel to update the position of each particle

In this section, you add the code to set the position of the particles on the Stage. Follow these steps:

  1. Launch the Pixel Bender Toolkit.
  2. Create a new kernel by selecting File > New Kernel.
  3. Rename the kernel to Particle.
  4. Set the namespace to com.adobe.max10.
  5. Set the vendor to your name (or the name of your company).
  6. In the evaluatePixel function, after the sampleNearest line, add the following code:
// position-new = position-old + velocity dst.rg += dst.ba;

The Pixel Bender kernel is reading four float values of the ByteArray at a time. The four floating-point values are mapped to the colors in a pixel, so the red and green components of the pixel correspond to the x and y coordinates of the particle and the blue and alpha components of the pixel correspond to the velocity values.

The kernel should now look something like this:

<languageVersion : 1.0;> kernel Particle < namespace : "com.adobe.max10"; vendor : "Adobe Systems"; version : 1; description : "simple non-interacting particle system"; > { // the current position and velocities input image4 src; // the new position and velocity output pixel4 dst; void evaluatePixel() { // get the position/velocity of a particle dst = sampleNearest(src,outCoord()); // dst.r = particle position X // dst.g = particle position Y // dst.b = particle velocity X // dst.a = particle velocity Y // position-new = position-old + velocity dst.rg += dst.ba; } }
  1. Save the kernel as Particle.pbk in the kernels directory that you created in Step 2.
  2. Export the bytecode file as Particle.pbj to the pbjs directory by choosing File > Export Filter for Flash Player.

Using the Pixel Bender filter to animate the particles

Here you add the code that animates the particles in the application. Follow these steps:

  1. Switch back to Flash Builder.
  2. Create a new function named enterFrameHandler, which takes a single event parameter and returns void after the applicationCompleteHandler function, like this:
protected function enterFrameHandler(event:Event):void { }
  1. In the applicationCompleteHandler function, register the new enterFrameHandler function as an event listener for the ENTER_FRAME event and move the lines that draw in the particleDisplay canvas object into the new enterFrameHandler function:
protected function applicationCompleteHandler(event:FlexEvent):void { initializeByteArray(); this.addEventListener(flash.events.Event.ENTER_FRAME, enterFrameHandler); } protected function enterFrameHandler(event:Event):void { particleDisplay.graphics.clear(); particleDisplay.graphics.beginBitmapFill(draw()); particleDisplay.graphics.drawRect(0.0, 0.0, particleDisplay.width, particleDisplay.height); particleDisplay.graphics.endFill(); }
  1. Run the ParticleSystemExercise application. As it plays, the particles display a  shimmering effect as they change color on each frame.
  2. Add the code to embed the pbj file into your application after the import line:
[Embed("pbjs/particle.pbj", mimeType="application/octet-stream")] private var ParticleKernel:Class;
  1. After the declaration of the m_bytes member variable, add a new declaration for a member variable named m_shader of type Shader and initialize it with the Embedded kernel:
private var m_shader:Shader = new Shader(new ParticleKernel() as ByteArray);
  1. In the enterFrameHandler function, add the following lines before the drawing code:
m_shader.data["src"].width = PARTICLE_COUNT; m_shader.data["src"].height = 1; m_shader.data["src"].input = m_bytes; var sj:ShaderJob = new ShaderJob( m_shader, m_bytes, PARTICLE_COUNT, 1); sj.start(true);

This code sets the input of the shader to be the m_bytes ByteArray object. Since the input is a ByteArray and not a BitmapData object, the width and height of the input must be set on the shader object.

In this example, the width is used as the number of particles and the height is set to 1. The ShaderJob object is then created. This requires a Shader object, a destination buffer (in this case the m_bytes ByteArray is reused as the output buffer), and when using a ByteArray or vector, it also requires width and height values of the destination buffer.

When the start function is called, it launches the ShaderJob by passing in the true value and then waits until the ShaderJob completes rather than registering an event handler to be notified when the ShaderJob has completed.

Note: In this case, the name of the input is known, so you can refer to it by name without first checking that it exists. If your project includes code that will load arbitrary Pixel Bender filters, you'll need to enumerate the inputs, rather than attempting to address them directly by their name. Flash includes a limit of 8,000 for both the width and height of inputs.

Run the ParticleSystemExercise application again. The particles animate around the window and, over time, they eventually leave the window. In the next section, you'll resolve that issue.

Constraining the particles in a window

This section shows you how to add conditional blocks to ensure that the animated particles stay within a specific area. Follow these steps:

  1. Switch back to the Pixel Bender Toolkit and open the Particle.pbk file (if it isn't already open).
  2. Add a float2 parameter named size before the evaluatePixel declaration, like this:
parameter float2 size;

Note: In this example, it is not necessary to set the parameter metadata for min, max, and default values.

  1. Add the following lines before the end of the evaluatePixel function:
if ( dst.r < 0.0 ) { dst.r = 0.0; dst.b = -dst.b; } if ( dst.r > size.x ) { dst.r = size.x; dst.b = -dst.b; } if ( dst.g < 0.0 ) { dst.g = 0.0; dst.a = -dst.a; } if ( dst.g > size.y ) { dst.g = size.y; dst.a = -dst.a; }

The conditional blocks displayed above verify that a particle is not outside the window area. If the particle animates beyond one of the edges, it is moved back to the edge and its velocity is inverted, which makes the particle appear to bounce. (Remember that the colors in the pixel are used to refer to the particle's position and velocity as described above.)

Note: You can also refer to the channels of a pixel or float4 value using .xyzw or array indices, which may be helpful if the strategy of using the color letters is confusing.

  1. Save the Pixel Bender kernel and export it to the pbjs directory by selecting File > Export Filter for Flash Player. The current text of the Particle.pbk file should look something like this:
<languageVersion : 1.0;> kernel Particle < namespace : "com.adobe.max10"; vendor : "Adobe Systems"; version : 2; description : "simple non-interacting particle system"; > { // the current position and velocities input image4 src; // the new position and velocity output pixel4 dst; // the size of the window parameter float2 size; void evaluatePixel() { // get the position/velocity of a particle dst = sampleNearest(src,outCoord()); // dst.r = particle position X // dst.g = particle position Y // dst.b = particle velocity X // dst.a = particle velocity Y // position-new = position-old + velocity dst.rg += dst.ba; // make sure the particle is still in the window // if it is off an edge, put it back on the edge and // invert the velocity, making it "bounce" if ( dst.r < 0.0 ) { dst.r = 0.0; dst.b = -dst.b; } if ( dst.r > size.x ) { dst.r = size.x; dst.b = -dst.b; } if ( dst.g < 0.0 ) { dst.g = 0.0; dst.a = -dst.a; } if ( dst.g > size.y ) { dst.g = size.y; dst.a = -dst.a; } } }
  1. Switch back to the ParticleSystemExercise.mxml file in Flash Builder.
  2. Add the following line before the declaration of the ShaderJob object in the enterFrameHandler function:
m_shader.data["size"].value = [particleDisplay.width, particleDisplay.height];

This line of code sets the value of the size parameter.

  1. Run the ParticleSystemExercise application again. This time when the application runs, the particles bounce off the edges of the window. If you'd like to experiment, you can change the size of the window and notice how the particles react (see Figure 2).
Figure 2. Pixels constrained within the window area.
Figure 2. Pixels constrained within the window area.

Improving performance of the Pixel Bender shaders

Now it's time to review two strategies for improving performance. The first involves revising the ShaderJob to use multiple threads.

Updating the ShaderJob to use multiple threads

Follow these steps to add the code:

  1. After the declaration of the PARTICLE_COUNT constant, add a new declaration of a constant named ROWS of type uint initialized to the value 10:
private const ROWS:uint = 10;
  1. In the enterFrameHandler function, where the width is specified to be PARTICLE_COUNT for both the Shader inputs and ShaderJob output, change that value to PARTICLE_COUNT/ROWS.
  2. Also in the enterFrameHandler function, change the code where the input height of the shader is 1 and the output height in the ShaderJob is set to 1, to set them to ROWS instead, like this:
m_shader.data["src"].width = PARTICLE_COUNT/ROWS; m_shader.data["src"].height = ROWS; m_shader.data["src"].input = m_bytes; m_shader.data["size"].value = [particleDisplay.width, particleDisplay.height]; var sj:ShaderJob = new ShaderJob( m_shader, m_bytes, PARTICLE_COUNT/ROWS, ROWS);

Note: When shaders are executed in Flash Player, the height of the output buffer is used to divide the computation into multiple threads. If the height is set to 1, only one thread is spawned. Most current computers have the capability to run between two and eight threads at the same time. It is a best practice to always use multiple rows when passing ByteArray or vector objects to be processed with Pixel Bender.

  1. Run the ParticleSystemExercise application again.

    The application's performance may not be noticeably different on your computer with only 8,000 particles. Because the data is now being divided into multiple rows, however, it is now possible to modify the PARTICLE_COUNT and ROWS constants so that you can run many more particles without exceeding the width or height of 8,000. If you'd like to experiment, test to see how many you can run and still maintain acceptable performance on your machine.

Improving performance of the Pixel Bender shaders by changing conditional blocks into conditional assignments

Now look at the second strategy to improve performance. Follow these steps:

  1. Switch back to the Pixel Bender Toolkit. Open the particle.pbk file, if it is not already open.
  2. Replace the existing lines of the if blocks with the following code:
float2 offLeft = float2(0.0, -dst.b); float2 offLeft2 = dst.rb; dst.rb = (dst.r < 0.0) ? offLeft : offLeft2; float2 offRight = float2(size.x, -dst.b); float2 offRight2 = dst.rb; dst.rb = (dst.r > size.x) ? offRight : offRight2; float2 offTop = float2(0.0, -dst.a); float2 offTop2 = dst.ga; dst.ga = (dst.g < 0.0) ? offTop : offTop2; float2 offBottom = float2(size.y, -dst.a); float2 offBottom2 = dst.ga; dst.ga = (dst.g > size.y) ? offBottom : offBottom2;

While the logic may seem much more complicated, it is not as complex as it appears. For example, this part of the code:

float2 offLeft = float2(0.0, -dst.b); float2 offLeft2 = dst.rb; dst.rb = (dst.r < 0.0) ? offLeft : offLeft2;

can also be written as:

if (dst.r < 0.0) { dst.rb = float2(0.0, -dst.b); } else { dst.rb = dst.rb; }

Note: Because of the way the Pixel Bender runtime in Flash optimizes code, conditional statements can be significant performance bottlenecks. When you build projects, it is a good idea to test the application to see if the code performed in an if/else block can be computed separately and then use the select statement to assign the final value to variable. This strategy can potentially improve performance, but it is worth evaluating the application using both methods to verify the one that works best.

  1. Save the Pixel Bender kernel and export it to the pbjs directory by choosing File > Export Filter for Flash Player.
  2. Switch back to Flash Builder.
  3. Run the ParticleSystemApplication exercise. You may notice a performance improvement, depending on the capabilities of your computer.

In the last section of this article, you'll review the completed code that was used to build the final version of the particle system application. If you are following along with these instructions, you can compare your project to the final project files. You can also extend these files to modify the project in various ways.

Analyzing the completed project code

Compare the completed code for the application with the code that you've updated throughout the course of this tutorial. Open the files you created locally and compare them with the final code shown next.

Final version of the code in ParticleSystemExercise.mxml:

<?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" applicationComplete="applicationCompleteHandler(event)"> <fx:Script> <![CDATA[ import mx.events.FlexEvent; [Embed("pbjs/Particle.pbj", mimeType="application/octet-stream")] private var ParticleKernel:Class; private const PARTICLE_COUNT:uint = 80000; private const ROWS:uint = 10; private var m_bytes:ByteArray = null; private var m_shader:Shader = new Shader(new ParticleKernel() as ByteArray); // initialize the particle system private function initializeByteArray():void { m_bytes = new ByteArray(); // must be LITTLE_ENDIAN for Pixel Bender m_bytes.endian = Endian.LITTLE_ENDIAN; // Create PARTICLE_COUNT particles and store in ByteArray for ( var i:uint=0; i<PARTICLE_COUNT; i++ ) { // Particle position – x m_bytes.writeFloat(Math.random()*particleDisplay.width); // Particle position – y m_bytes.writeFloat(Math.random()*particleDisplay.height); // particle velocity – x m_bytes.writeFloat((Math.random()*2.0)-1.0); // particle velocity – y m_bytes.writeFloat((Math.random()*2.0)-1.0); } } // draw the particle system private function draw():BitmapData { // create the BitmapData object to draw into var bd:BitmapData = new BitmapData( particleDisplay.width, particleDisplay.height, false ); bd.lock(); // lock the BitmapData for drawing // walk the ByteArray to get all the particles m_bytes.position = 0; while ( m_bytes.bytesAvailable > 0 ) { // the first two floats are the x,y of the particle // draw using a random color bd.setPixel( m_bytes.readFloat(), m_bytes.readFloat(), 0x000000 + Math.random() * 0xFFFFFF ); // skip the next two floats (1 float == 4 bytes), // they contain the velocity m_bytes.position += 8; } bd.unlock(); // unlock the BitmapData return bd; } protected function applicationCompleteHandler(event:FlexEvent):void { // initialize the particle system initializeByteArray(); this.addEventListener( flash.events.Event.ENTER_FRAME, enterFrameHandler ); } protected function enterFrameHandler(event:Event):void { // update the particle positions by running them through the // pixel bender filter this is setting the "width" of the input // buffer in "pixels" (groups of four floats) m_shader.data["src"].width = PARTICLE_COUNT/ROWS; // this is setting the "height" of the input buffer in rows m_shader.data["src"].height = ROWS; // this sets the ByteArray as the input data m_shader.data["src"].input = m_bytes; // set the size of the window as the value of the size // parameter m_shader.data["size"].value = [particleDisplay.width, particleDisplay.height]; // construct the shader job, using the m_bytes ByteArray as the // output buffer (it is also being used as the input buffer) // also pass in the width and height of the input buffer var sj:ShaderJob = new ShaderJob( m_shader, m_bytes, PARTICLE_COUNT/ROWS, ROWS); // launch the shader job and wait for it to return sj.start(true); // draw the particle system particleDisplay.graphics.clear(); particleDisplay.graphics.beginBitmapFill(draw()); particleDisplay.graphics.drawRect( 0.0, 0.0, particleDisplay.width, particleDisplay.height ); particleDisplay.graphics.endFill(); } ]]> </fx:Script> <mx:Canvas id="particleDisplay" width="100%" height="100%" /> </s:WindowedApplication>

Final version of the code in Particle.pbk:

<languageVersion : 1.0;> kernel Particle < namespace : "com.adobe.max10"; vendor : "Adobe Systems"; version : 3; description : "simple non-interacting particle system"; > { // the current position and velocities input image4 src; // the new position and velocity output pixel4 dst; // the size of the window parameter float2 size; void evaluatePixel() { // get the position/velocity of a particle dst = sampleNearest(src,outCoord()); // dst.r = particle position X // dst.g = particle position Y // dst.b = particle velocity X // dst.a = particle velocity Y // position-new = position-old + velocity dst.rg += dst.ba; // make sure the particle is still in the window // if it is off an edge, put it back on the edge and invert the velocity, making it "bounce" // instead of using if statements, use conditional assignments instead which are MUCH faster // in the Flash Pixel Bender runtime. // // conditional assignments in Flash only let you choose between two constants, so you // need to compute both values, but the computation here is trivial so it isn't a big performance // hit // // also using the ability to set multiple values of a vector at once to reduce the number of operations float2 offLeft = float2(0.0, -dst.b); float2 offLeft2 = dst.rb; dst.rb = (dst.r < 0.0) ? offLeft : offLeft2; float2 offRight = float2(size.x, -dst.b); float2 offRight2 = dst.rb; dst.rb = (dst.r > size.x) ? offRight : offRight2; float2 offTop = float2(0.0, -dst.a); float2 offTop2 = dst.ga; dst.ga = (dst.g < 0.0) ? offTop : offTop2; float2 offBottom = float2(size.y, -dst.a); float2 offBottom2 = dst.ga; dst.ga = (dst.g > size.y) ? offBottom : offBottom2; } }

Where to go from here

Adapt the Pixel Bender concepts described in this article and apply them to your own ActionScript projects. Experiment with extending this sample project by adding a second source input to the Pixel Bender kernel that uses an actual bitmap image to constrain the particles.

Check out these other resources to learn more about working with Pixel Bender:

  • Pixel Bender basics for Flex and AIR
  • Pixel Bender basics for Flash
  • Pixel Bender Technology Center
  • Effects with the Pixel Bender Toolkit
  • Pixel Bender Developer's Guide (PDF, 1 MB)

Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License+Adobe Commercial Rights

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.

More Like This

  • Pixel Bender release notes
  • Effects with the Pixel Bender Toolkit – Part 1: Creating a new filter
  • Effects with the Pixel Bender Toolkit – Part 2: Creating a vintage tone filter
  • Effects with the Pixel Bender Toolkit – Part 3: Adding parameters to filters
  • Effects with the Pixel Bender Toolkit – Part 4: Sampling multiple pixels
  • Effects with the Pixel Bender Toolkit – Part 5: Applying a filter to an image in Flash
  • Effects with the Pixel Bender Toolkit – Part 6: Modifying Pixel Bender parameters in Flash
  • Effects with the Pixel Bender Toolkit – Part 7: Improving the displacement filter
  • Effects with the Pixel Bender Toolkit – Part 8: Controlling the displacement filter with mouse positioning
  • Effects with the Pixel Bender Toolkit – Part 9: Integrating multiple image sources with a Pixel Bender kernel

Tutorials & Samples

Tutorials

  • Animating a particle system
  • Creating a new Pixel Bender filter
  • Creating a vintage tone Pixel Bender filter

Samples

Pixel Bender Forum

More
04/10/2012 Fast Fourier Transform (FFT) in Pixel Bender?
04/19/2012 Shader works in toolkit, not in Flash
04/12/2012 Pixel Bender removed from AE CS6 !?
03/22/2012 Load an HDR image into Pixel Bender Toolkit

Pixel Bender Exchange

More
Escher's Droste Effect
4D Quaternion Julia-set Ray Tracer with Ambient Occlusion
Raytracer
Zoom Blur Focus

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement