is the JavaScript in the bottom pane of the QC 3.x CIFilter patch only evaluated when non-__sampler inputs change, or is it evaluated per-frame all the time?

It's only evaluated when the filter is evaluated.

To test this theory:

Filter code:   This will saturate to all-white as "count" increases

kernel vec4 multiplyEffect(sampler image, __color color, float count)
{
        return sample(image, samplerCoord(image)) * color + count;
}


Filter Function: This will increase count by 0.01 each time it executes.

var count = 0;

function __image main(__image image, __color color)
{
        count += 0.01;
return multiplyEffect.apply(image.definition, null, image, color, count);
}

If you pass a static image through the filter, the output is essentially the same (0.01 units brighter), and doesn't get brighter with time.

If you change the image, they get progressively brighter, until the whole image is white.

Thus, it executes when the filter does.

--
[ christopher wright ]
[email protected]
http://kineme.net/

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to