Blur is an interesting effect, mainly because it lets us enjoy the main object yet the out-of-focus parts add something to the realism. Like in the default KDE 4.0’s splash screen:
For PictureFlow, I decided to add the support for optional blur effect for the reflection, as shown in the following comparison:
It is even more enjoyable when you run the demo program and see those book covers sliding, as if they are ice skating. Shader guru can quickly point out the fakeness of the blur. Rather than blurring the “floor” after the reflection is painted there, I choose to blur the reflection for each image beforehand. Fake but fast and fun enough. As for the algorithm, it is the famous blazing-fast exponential blur from Jani Huhtanen, used among others in KDE 4’s Plasma.
Another improvement is that the background color can be customized, not limited to black. In fact, black is particularly suitable to do fast reflection illusion cause blending a specific color with black can be approximated by multiplying its RGB components with a decreasing factor. But since I saw that Cover Flow for iPod nano is with white background, I thought I just let you use your favorite color for PictureFlow.
In addition, I refactored the code so that it is more maintainable. For simplicity, the horribly long look-up sine/cosine table has been reduced with the help of simple interpolation. Even better, PictureFlow now supports Qt 4 (Win32, Linux, Mac, Qtopia, Windows Mobile), Qt 3 (tested on Linux only), and Qt 2 (for Qt/Embedded platform) with a single code base. Maybe even Symbian in the future 🙂