Frame difference in open gl?

laserpilot's icon

I am trying to emulate this effect in open gl:

Max Patch
Copy patch and select New From Clipboard in Max.

Just a simple frame difference (could be any op, but I'm used to using

When i try an implement this in open gl using one of the math shaders and a feedback into a blank gl.slab and into the tex2 input (since i cant use [t l l]) it doesn't end up working the same way, or if i do get it work it ends up strobing twice as fast. I supposed having a jit.change at the beginning of the effects chain could work, but that messes up other elements (ie stopping the video but still changing effects parameters move normally)

Could the answer be to just slow my metro down to get less of a fast strobe?

Any advice on other glitchy/strobe effects would be great..I'm trying to get rid of all of the non-open-gl effects in my performance patch, but haven't hit glitch gold yet

Rob Ramirez's icon

because of the way jitter copies the matrix to a gl texture, you need to store the previous frame in a separate matrix object.

Max Patch
Copy patch and select New From Clipboard in Max.

laserpilot's icon

Thanks, that does make sense, but unfortunately I forgot to mention that it is within an effects chain and is in the middle of a few gl textures already, so it is not coming in initially as matrix data. i ended up ripping something out of a wake-gl effect someone on this board had helped me with and just tossed some blurs in the signal chain and that seems to slow it down enough (or something like that) to get the frame difference...here is what it looks like within the signal chain..i'm doing different mixing to achieve different effects with feedback and the like..changing the datatype created some really interesting results, but some changes would just crash the texture and I'd have to close and re-open my patch:

Max Patch
Copy patch and select New From Clipboard in Max.

Andrew Benson's icon

I think this is what you're looking for.

Andrew B.

Max Patch
Copy patch and select New From Clipboard in Max.

laserpilot's icon

Apologies andrew, but I'm confused..I think you just posted the exact same thing I posted in my first post on the thread

Andrew Benson's icon

How embarassing! Here is what I meant to send:

Max Patch
Copy patch and select New From Clipboard in Max.

laserpilot's icon

ahh..i feel like i tried at at one point but I must've done something wrong..and then i assumed that a gl_texture wasn't a list in the same way a matrix is a list, which was probably a silly assumption..but yes..that works exactly the way i wanted, thanks!