kernel FlatGenerator < namespace : "omino"; vendor : "omino.com"; version : 1; description : "Some 2d Arithmetic"; > { parameter pixel2 center ; parameter float4 dividers ; parameter float4 redContribution ; parameter float4 greenContribution ; parameter float4 blueContribution ; input image3 src; output pixel3 dst; void evaluatePixel() { float2 coord = outCoord() - center; float4 parts; parts.x = sin(coord.x / (0.01 + sqrt(abs(coord.x/ dividers.x)))); parts.y = sin(coord.x / (0.01 + sqrt(abs(coord.y/ dividers.y)))); parts.z = sin(coord.y / (0.01 + sqrt(abs(coord.x/ dividers.z)))); parts.w = sin(coord.y / (0.01 + sqrt(abs(coord.y/ dividers.w)))); dst.r = dot(parts,redContribution); dst.g = dot(parts,greenContribution); dst.b = dot(parts,blueContribution); } }