Loading...

quartz-dev@lists.apple.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: Question regarding a custom image unit Paul Franceus Thu Nov 09 12:11:49 2006

I realize that that's what the error message says, but as far as I can tell, my kernel takes floats as arguments, I'm declaring the argument as a scalar and I'm passing in an NSNumber.

Here's the declaration of my shader:

kernel vec4 Convolution3by3( sampler src, float r00, float r01, float r02,
                                                                                
  float r10, float r11, float r12,
float r20, float r21, float r22)

and I've declared the type as scalar in my -customAttributes method but it still complains that it expects r00 to be a vector.

On Nov 7, 2006, at 5:45 PM, Jason Harris wrote:

The first argument that your shader takes is a vector argument, but when you call the shader, you're not passing it a vector as the first argument.

Jason


On Nov 7, 2006, at 1:46 PM, Paul Franceus wrote:

I'm creating a custom core image filter. I have tested my kernel with Quartz Composer and it works great.

I have a -customAttributes method that defines the parameters to the filter as such:

    return [NSDictionary dictionaryWithObjectsAndKeys:

        [NSDictionary dictionaryWithObjectsAndKeys:
            kCIAttributeTypeScalar,  kCIAttributeType, nil],
        @"r00",

....

        [NSDictionary dictionaryWithObjectsAndKeys:
            kCIAttributeTypeScalar,  kCIAttributeType, nil],
        @"r22",

        nil];
}

I've compiled and installed my filter in ~/Library/Graphics/ ImageUnits and my app finds it when it loads.

The problem comes when I attempt to use the filter. I get the following error message:

exception 'CIKernelBadArgument' (reason 'Convolution3by3: Convolution3by3: argument #1 (r00) should be a CIVector object') was raised during a dragging session

I don't know where it's getting the idea that this should be a vector argument. Any thoughts?

Paul Franceus
[EMAIL PROTECTED]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      ([EMAIL PROTECTED])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/smeger% 40geekspiff.com

This email sent to [EMAIL PROTECTED]


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      ([EMAIL PROTECTED])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/alexiscircle%40gmail.com

This email sent to [EMAIL PROTECTED]