Forums > Gen

blur using jit.gen

April 3, 2012 | 10:35 am

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


April 3, 2012 | 3:50 pm

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


April 3, 2012 | 6:23 pm

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


April 3, 2012 | 7:17 pm

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

http://cycling74.com/forums/topic.php?id=37876


April 3, 2012 | 8:06 pm

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. –

April 3, 2012 | 9:31 pm

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 jit.gl.pix 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. –

April 3, 2012 | 10:56 pm

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.


Viewing 7 posts - 1 through 7 (of 7 total)