Use this:
kernel vec4 alternateLines(sampler image)
{
        vec2 xy = samplerCoord(image);
        
        xy.x = (mod(xy.y, 2.0) < 1.0) ?
                        xy.x :
                        samplerSize(image).x - xy.x;
                
        return sample(image, xy);
}

Don't use == with floating point numbers (esp. when they're potentially hardware accelerated floats outside of CL's more strict behavior domain).

--
[ 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