Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 793 Bytes

README.md

File metadata and controls

12 lines (9 loc) · 793 Bytes

Fast Blur

A minor improvement on the Apple sample code from WWDC 2013 for recreating the iOS7 blur effect. It runs between 1.5 and 8 times faster than the original sample code, mostly because of a bug that would always cause the blurred image to be rendered at screen scale regardless of the images own scale.

Improvements

  1. Always match the images scale when blurring
  2. Instead of blending the tint color, combine it with the saturation step, removes one draw call
  3. Don't draw the original image into the context before drawing the blur on top of it, removes another draw call
  4. Create a temporary buffer for use during blurring, avoids 3 tear up / downs in quick succession
  5. Made it possible to create opaque blurred images
  6. Split the code into more readable helper methods