After reading this thread on SwingLabs‘ forums, I suddenly felt like I had to have my own blur effect on my reflective panel too 😀 (yeah I know, I’m becoming a copycat of Romain Guy and SwingLabs’ ideas :-D)
Try this demo (Java 1.5 needed)
I updated the reflective panel to include some new parameters :
- blur radius (extremely slow, it uses a ConvolveOp)
- color saturation (very slow too, it uses a LookupOp, as the ColorConvertOp was simply too much of a performance killer)
- distance between content and its reflect
- maximum alpha value of the reflection
- global alpha for the content + reflection.
All these effects are combined, so the more your activate, the slower the rendering will be. Anyway, who would like to watch a blurred movie ?
[Edit Nov. 18th] It actually looks like the ConvolveOp and LookupOp are much (much) faster on Windows than on Mac OS X. Maybe the Java2D DirectX pipeline optimizes them (in hardware) while they’re just left up to the CPU on the Mac Java2D version…