Optimization test AS3 - BlurFilter | August 18th, 2008
var blur:BlurFilter = new BlurFilter(blurX, blurY, quality);
displayObject.filters = [blur];
Let’s start with the basics. When you create a new BlurFilter object, it has 3 properties. First one is horizontal blur strength, second is vertical blur strength, and the third is quality. Blur strength needs to be above 1 and quality above 0 for BlurFilter to take effect. The second line of code is used to actually apply the filter onto an existing object. Filters are not update itself, so whenever you make a change to the filter properties, you will need to reapply the filter on objects.
Strength VS Quality
Almost identical blur effect can be achieved by balancing the strength and quality. Lowering the quality is the key to better performance. As shown in above images, the difference in FPS is significant.
Area VS Quantity
These examples show the difference in FPS as a result of where you applied the effect. On the top image, it’s significant that applying the filter on individual object increases the FPS. However, this is only the case if you have low number of child objects. In the second example, applying the effect on the sprite containing all the child objects have slightly higher FPS.