Forums > Gen

RGB offset in

Sep 10 2012 | 8:30 pm


I have a no0bish Gen question. How can i make an RGB-offset setup? I’ve been noodling around with Norm, Swiz, Sample and Vec and i’m not getting the results i hope for. I tried looking at the Luma Displace patch, hoping for answers but still no luck…I wish to offset R G B channels in a feedback setup…somehow.

Thank you : Marko

Sep 10 2012 | 9:32 pm

To spatially offset each color channel differently, you’ll need one sample operator per channel and a different parameter per channel to control the amount of offset. Here’s an example:

-- Pasted Max Patch, click to expand. --

Sep 10 2012 | 10:36 pm

Thank you Wesley!

Sep 24 2016 | 6:03 am

I’m trying to make a filter which would create a shift in the red channel to "fake" an anaglyph image, based on the luminance of the pixel, with a 50% grey pixel having no shift. So basically what’s darker will be backward and what’s brighter than 50% grey will be in progressively front, total white (100%) having largest shift (red on right, cyan on left) as well as black (0%) having largest shift but inversed (red on left, cyan on right).
I tried to merge the patch found here with Gen script lumadisplace, but can’t get farther than that.. help! :)

Sep 24 2016 | 8:02 am

Like this? The trick with texture displacement is to think of each pixel as 1/dimth in size.
ex. out = sample(in1, norm+shift_xy*(1/dim)); Hope that helps. Cheers.

— Pasted Max Patch, click to expand. —
Sep 28 2016 | 8:34 am

Hi Metamax,
thanks a lot for the quick reply, it’s unfortunate I couldn’t answer earlier, waiting for an email notifications that never got through.. well anyway.. about the gl.pix.. yes, almost..

I join an image hoping to give you a clearer idea. Trying to explain it differently..
100% white pixel = max Red shift rightside AND max Cyan shift leftside
75% white pixel = halfway Red shift rightside AND halfway Cyan shift leftside
75% white pixel = no Red/Cyan shift
25% white pixel = halfway Red shift leftside AND halfway Cyan shift rightside (inverted)
0% white pixel = max Red shift leftside AND max Cyan shift rightside
Keep the "ghost white pixel" centered..

I’d try to get it by myself, but I’m not comfortable reading and writing the code inside gl.pix, sorry

Thanks a lot,

  1. Luma-RedCyan-Shift


Sep 29 2016 | 7:29 am

Gio, I will take a closer look when I have a few minutes. Been super busy. The pic is helpful.

Sep 29 2016 | 7:47 am

Thanks a lot! The gig is tomorrow.. if you could that’d be great!

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

Forums > Gen