blur using jit.gen

Apr 3, 2012 at 10:35am

blur using jit.gen

do you know, how to recreate for example gaussian blur in jit.gen?
what could be my starting point?

Apr 3, 2012 at 3:50pm

You could look at the cf.gaussian.2p.jxs shader file in jitter-shaders/convolution and try translating it to gen.

Apr 3, 2012 at 6:23pm

hmm and maybe you know the way for syntax highlighting in glsl code?

Apr 3, 2012 at 7:17pm

Les Stuck made a very instructive gl.pix blur, see in the “exfoliator” patch

Apr 3, 2012 at 8:06pm

Here’s the cf.gaussian.2p.jxs shader/slab ported to gl.pix. I left the GLSL code in a comment inside the genpatcher.

– Pasted Max Patch, click to expand. –
Apr 3, 2012 at 9:31pm

many thanks for advice matmat and wesley!!
sorry for hassle, but i ve got another question regarding this topic.
i would like to implement those two in one instance, but i am getting weird errors, and i dont know what am i doing wrong..
here is my attempt:

– Pasted Max Patch, click to expand. –
Apr 3, 2012 at 10:56pm

The errors will be better in 6.0.6, but the crux of the problem is the second call to blur:

“first = blur(input, in2);
second = blur(first, in3);”

The first argument to blur has to be a direct input in1, in2, … at the patcher level because it’s being used as the first argument to a sample function. The first argument to sample always has to be an input from [in 1], etc. It’s not possible to combine these two separate gl.pix objects together and get the same effect. That’s just the way separable convolution works.


You must be logged in to reply to this topic.