kernel ReflectorPrism < namespace : "visualrinse"; vendor : "Chad Udell"; version : 1; description : "An Attempt to Emulate the Prismatic effect of looking through a plastic reflector, or a zipper, or something"; > { parameter float amount < minValue:0.0; maxValue:1024.0; defaultValue:0.0; >; input image4 src; output pixel4 dst; void evaluatePixel() { float x = outCoord().x; float y = outCoord().y; float s = (sqrt(x*y)+x-y); float r = tan(cos(x*y*sin(s*-x*y*s))); float2 psudrand = float2(sin(y), cos(x)); dst = sampleNearest(src,outCoord()+amount*psudrand); } }