Hi List,

I'm trying to create a kind of threshold effect, but I'm very new to CI coding. Here's what I'm trying to achieve:

-I need to change all pixels under a certain brightness value to black.
- And remap the brightness of the remain pixels to a 0 to 1 range (so I get contrast even on high threshold values).

- It doesn't matter if the resulting output is grayscale, I don't need the color information.

It is definitely not working right now so I need your help :)

Here's the code I've got for now (and I've attached the simple patch)

Attachment: test_threshold.qtz
Description: application/quartzcomposer

:

kernel vec4 threshhold(sampler image, float threshold)
{
        vec4 newpix = sample(image, samplerCoord(image));       
        vec4 newpix = (newpix - threshold) / (1.0-threshold*1.1);
        newpix.a = 1.0;
        return vec4 (newpix);
}




 _______________________________________________
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