/* david van brink / poly@omino.com * This kernel shows a mismatch in the implementation of Pixel Bender * between CPU and GPU rendering. Tested on Mac OS X 10.5.5 & * Pixel Bender Toolkit build 35 * 2008.10.06 */ kernel g3 < namespace : "AIF";vendor : "omino.com";version : 2; description : "demonstrate bug in mod() function"; > { parameter int xShift ; parameter int xMod ; input image3 unused; // only to establish the input size output pixel3 dst; void evaluatePixel() { float x = outCoord().x - float(xShift); x = mod(x,float(xMod)); dst.r = x; dst.b = x > 0.0 ? 0.0 : 0.5; dst.g = 0.0; } }