Starling DisplacementMap Labs

Talking about flash displacementMaps in starling tomorrow evening at Danish Flash Usergroup, and I just wanted to gather some links…

related links:


mobile android lab app :




this lab is not just a mosaic effect lab with some dots overlayed – all lego pixels are represented in actual lego color values – where images colors are snapped to nearest lego color using 3D pythagoras + color perception offset (classic scalable/zoomable  flash) (starling version max 2048 px output) /

– to be continued with explanation


2 thoughts on “Starling DisplacementMap Labs

  1. This is a Starling DisplacementMapFilter? What DisplayObject is this filter applied to, the stage? Or some other high-level container?

    My (quite limited) experience to date with Starling filters is that they are slow on devices, but it seems that this works well on Android?

    I don’t see any demo source — could you separate out a small example to provide?

    1. private var dTexture:RenderTexture;
      private var dFilter:DisplacementMapFilter;

      // init
      mapQuad = new Quad(256, 256, 0x808080, false);

      // set content ready

      content.addChild(heroArm.display as Sprite)

      // init filter
      dFilter = new DisplacementMapFilter(dTexture, null, BitmapDataChannel.RED, BitmapDataChannel.GREEN, 100, 100, false);
      //add filter
      content.filter = dFilter;

      // if update map
      //draw displayobject (starling sprite)

      // reset map
      dFilter.mapTexture = dTexture

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s