2005-02-05

Currently Convolving

I'm trying to find a fast way of doing nice convolution in Java on OS X, as in this SVG, for an interactive diagram editor.


The java.awt.image convolution is far, far slower than any native code I've seen on OS X, and the OpenGL accumulation buffer isn't accelerated either, so can't use that and be able to drag the image around (other than caching the part of the image of the image being dragged for movement, though that doesn't apply for resize). Using a filter pipeline (see SoftShadow.java takes about 600ms to convolve a 400x400 area, about 100ms or 40ms for drop-shadow specific hacks, about as slow a convolve on the non-accelerated OpenGL accumulate buffer.


I suppose you could also turn drop shadow off during drag or resize then up the render quality later, but it would be nice if it allowed full quality motion; a layers approach of sizing the solid blocks then another thread to add the convolve ops would also work, but you'ld have to pause the motion for long enough for it to catch up to get the quality one.

0 Comments:

Post a Comment

<< Home