I've had a lot of great results reworking the subtex.3d.maxpat example for to create interesting slit scan effects on the GPU. One thing I've been hoping to do is figure out a way to shift the storage location of each frame in the Z buffer of the jit.gl.texture object. Currently it's quite simple to write each new frame of a camera or movie by writing the frame to a location on the Z buffer using dstdim (dstdimstart 0 0 $1, dstdimend 1023 1023 $1). However once I reach the end of the buffer I have to cycle back to the beginning of the buffer to write over previously written frames which creates a pretty abrupt transition when trying to work with continuous frames (i.e. a live camera input).
What I'm hoping to do is figure out a way push each frame in the Z buffer to be stored at location that is 1 less than its current location. Essentially the first frame in the buffer would always be the most recent frame with previous frames shifting down 1 slot until it reaches the oldest frame which is removed from the buffer. This would allow for a smoother way of working with continuous frames in real time.
Is this kind of storage shifting possible using the dstdim attribute with jit.gl.texture or conversely would there be some way to do this with jit.gl.pix? Would this be too computationally heavy even if I could get it working? I spent some time looking into the OpenGL structure for 3D textures but couldn't find anything on this. Any help, ideas or internet rabbitholes to fall down would be appreciated. Attached is the basic slitscan patch I've created by ripping most of the subtex.3d patch and adding in the jit.bfg object as the luminance map..