Correct redrawing of a scene captured with glreadpixels?

Oct 30, 2011 at 12:15am

Correct redrawing of a scene captured with glreadpixels?

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?

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

– Pasted Max Patch, click to expand. –

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

And sorry for my bad english

Greetz,

Attachments:
  1. brushes.zip
#59667
Oct 30, 2011 at 5:20pm

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

Thanks for having a look

https://www.wetransfer.com/fw/0aInHahb/fdf4ef3a91b2df5d7dd8a82773da42cd4677b36538bc2dbb41d7c385c3076e45638386801805e5c

#214755

You must be logged in to reply to this topic.