HalfTone effect using PixelBender
Posted: October 28th, 2009 | Author: admin | Filed under: Effects, PixelBender | 1 Comment »After playing around a bit with the Sprite approach to crate halfTone, I realized I don’t have enough computing power to go fullscreen with it, so I turned to PixelBender. it’s a bit different working in PB, and a bit confusing, but with a little fiddling around I created a halftone filter (I couldn’t find any to download — the one on the PB Exchange doesn’t have the PBK file, so there’s no way to know the paramaters that you can control…). I ended up making these paramaters to work with:
brightness (the color f the dots from black [0.0] to white [1.0])
multiplier (offsets the size of the dots)
offset (distance between dots)
radius (ummm, the radius of the dots)
I realized that in order to smoothly fade it it is better to draw the bitmap with the PB effect onto another bitmap, effectively flattening the effect (for a halfTone there really isn’t any advantage of playing with the parameters in real time), and then disposing of the original BMP and the filter, freeing up much needed power.
here is a sample of what it looks like:
you can download the source here.
and here is the source of the PBK.
