kernel zoomBlur < namespace : "codeonwort"; vendor : "codeonwort"; version : 1; > { input image4 src; output pixel4 dst; parameter float centerX< minValue : -2000.0; maxValue : 2000.0; defaultValue : 200.0; >; parameter float centerY< minValue : -2000.0; maxValue : 2000.0; defaultValue : 200.0; >; parameter int steps< minValue : 1; maxValue : 100; defaultValue : 50; >; parameter float precision< minValue : 1.0; maxValue : 50.0; defaultValue : 1.0; >; void evaluatePixel() { pixel2 coord = outCoord(); dst = sampleNearest(src, coord); float dx = coord.x - centerX; float dy = coord.y - centerY; float d = precision / sqrt(dx * dx + dy * dy); dx *= d; dy *= d; float2 target = float2(coord.x, coord.y); for(int i = 0 ; i < steps ; i++){ target.x += dx; target.y += dy; pixel4 other = sampleNearest(src, target); dst = (dst + other) / 2.0; } } }