Core Image kernel functions are called once for each output pixel.
If I understand LinearImage, it's picking one raster (y value) out of
the image and displaying that for the whole image? If so, then for
each output pixel, you want to return the pixel that is in the same
column, but a specified row. To duplicate what's on the web site,
try something like the following, and hook it up to a mouse input
(I'm coding in my email client, so there may be bugs):
kernel vec4 linearImage(sampler image, float ycoord)
{
// get xy value
vec2 xy = samplerCoord(image);
// return image pixels for our column, specified row
return sample(image, samplerTransform(image, vec2(xy.x, ycoord)));
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden
This email sent to email@hidden