blur using jit.gen
hi!
do you know, how to recreate for example gaussian blur in jit.gen?
what could be my starting point?
You could look at the cf.gaussian.2p.jxs shader file in jitter-shaders/convolution and try translating it to gen.
hmm and maybe you know the way for syntax highlighting in glsl code?
Les Stuck made a very instructive gl.pix blur, see in the "exfoliator" patch
Here's the cf.gaussian.2p.jxs shader/slab ported to gl.pix. I left the GLSL code in a comment inside the genpatcher.
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:
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.