Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parameters messed up in Custom Kernel (solved)




On 18.08.2005, at 14:51, Bjoern Kriews wrote:

> float parameters messed up when using ternery operator

I rewrote my kernels using compare() instead of the ternary operator.
That fixed the weirdness.

I think this is a bug and Michel Schinz already reported it.
This one ruined my first impression of QC and cost me a couple of days
I could have spent otherwise.

Pierre, does it make sense to report it again to increase priority ?


To whom it may concern, here are the rewritten kernels / compositions.

File: realParameterpostCompare.qtz

kernel vec4 blackMask(sampler image, float minLevel)
{
    __color t = sample(image, samplerCoord(image));

    float v = ( t.r + t.g + t.b) / 3.0;

    return vec4(compare( v - minLevel, 1.0, 0.0));
    //return v < minLevel ? vec4(1.0) : vec4(0.0);
}

------------

File: parameterInfluencePostCompare.qtz

kernel vec4 blackImage(sampler image, float minLevel)
{
    __color t = sample(image, samplerCoord(image));

    float v = ( t.r + t.g + t.b) / 3.0;
    float delta = v - minLevel;

    return compare( vec4(delta,delta,delta,1.0), vec4(1.0,0,0,1.0), t);
    // return v < minLevel ? vec4(1.0,0,0,1.0) : t;
}

Attachment: parameterInfluencePost.qtz
Description: application/quartzcomposer

Attachment: realParameterPostCompare.qtz
Description: application/quartzcomposer




 _______________________________________________
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

References: 
 >Parameters messed up in Custom Kernel (or is it me ?) (From: Bjoern Kriews <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.