blur using jit.gen

    Apr 03 2012 | 10:35 am
    hi! do you know, how to recreate for example gaussian blur in jit.gen? what could be my starting point?

    • Apr 03 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.
    • Apr 03 2012 | 6:23 pm
      hmm and maybe you know the way for syntax highlighting in glsl code?
    • Apr 03 2012 | 7:17 pm
      Les Stuck made a very instructive gl.pix blur, see in the "exfoliator" patch
    • Apr 03 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.
    • Apr 03 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 in one instance, but i am getting weird errors, and i dont know what am i doing wrong.. here is my attempt:
    • Apr 03 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.