kernel zoomBlur < namespace : "codeonwort"; vendor : "codeonwort"; version : 1; > { input image4 src; output pixel4 dst; parameter float2 center< minValue : float2(-4000.0, -4000.0); maxValue : float2(4000.0, 4000.0); defaultValue : float2(200.0, 200.0); >; parameter int steps< minValue : 1; maxValue : 100; defaultValue : 5; >; parameter float precision< minValue : 0.95; maxValue : 1.00; defaultValue : 0.99; >; void evaluatePixel() { pixel2 coord = outCoord(); dst = sampleNearest(src, coord); float2 target = float2(coord.x, coord.y); for(int i = 0 ; i < steps ; i++){ target -= center; target *= precision; target += center; pixel4 other = sampleNearest(src, target); if(other.rgba != float4(0.0)) dst = .75 * dst + .25 * other; } } }