Consider the really simple difference kernel
kernel vec4 diffKernel(__sample image1, __sample image2)
return vec4(image1.rgb - image2.rgb, 1.0);
image1.rgb < image2.rgb
abs(image1.rgb - image2.rgb)
I actually ended up figuring this out -- you can use an option in CIContext to make sure that things are computed using the
kCIFormatAf key. This means that any calculations done on that context will be done in a floating point precision, so that values beyond the scope of [0,1] are preserved from one filter to the next!