Correct redrawing of a scene captured with glreadpixels?

dangdong27's icon

Hello everyone,

I've tried to get my mind around this for some time now and I cannot find an adequate solution, so I hoped some of you experts might have an idea about this.

I am drawing something with jit.gl.sketch (two "players", two instances) using its blend modes to blend the two layers accordingly.

Now I read back the content to a matrix once in a while to keep the cmdlist short. Everything works fine as long as I keep the readback on one jit.gl.gridhsape (one texture). After the readback everything looks as before except now it is a texture on a gridshape instead of a commandlist drawn by gl.sketch.

Now I have more than one player and as everyone of them has its own layer and settings I read back every layer(player) to its own matrix. So now (that's the idea) I can render them in the correct order to achieve the desired layer overlap.

And there the problem emerges. Somehow I cannot seem to get the blending modes for the readback-gridhapes right.
What I want to achieve is: to see the same image after the readback as It was before. But it always "screens" the two layers.

I think it has something to do with the alpha channel and that what I see is the pixels which are read + a blend mode? So it is not possible?

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

I hope the patch here illustrates what I mean.
In the attachment are some brushes.

Perhaps someone could point me in the right direction? I'd appreciate it.

And sorry for my bad english

Greetz,

2795.brushes.zip
zip
dangdong27's icon

And here is the patch as mxf file. Regarding the non-standard externals that are used

Thanks for having a look