Wouldnt you put the loop within the filter function of the CIKernel,
and use regular convolution methods for the gaussian blur by using
multiple samplers to grab the surrounding pixels and averaging their
values ?
You could have the filter function pass in different widths to the
kernel which would in effect make a multipass gaussian blur (ive never
tried this, but this is how I understood the functionality should work
- so I may be wrong)
On Apr 18, 2008, at 2:20 AM, Christopher Wright wrote:
Thanks for the info. Two questions then... (I tried googling the
answers, but no avail). What would be the best way to write say a
gaussian blur filter with variable parameters.
I've been wondering this myself for a long time. My guess is that
you could sample a bunch of "rings" about the pixel you're working
with, and then have the sum use weights for each of the rings, with
the weights based on the input radius. You can do conditionals like
this, but the code looks ugly, and it does a lot of work that isn't
necessarily necessary. Let me know if that makes sense; if not, I
can try to whip up a lame example sometime.
Also, kind of off topic, is there a way to edit the GLSL kernel
code in a more robust IDE and have it integrate with Quartz? It's
a bit annoying that every time you click on another patch it
resizes the window to the default.
You can edit it in the OpenGL Shader Builder, and then copy/paste
the code in. I think you can also try using Shift-Cmd-I to get a
static code editor window for the patch you're interested in.
Hope that helps you take a few more steps in your goal! :)
--
[ christopher wright ]
[EMAIL PROTECTED]
http://kineme.net/
_______________________________________________
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/doktorp%40mac.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
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]