Forums > Jitter

Correct redrawing of a scene captured with glreadpixels?

Oct 30 2011 | 12:15 am

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 (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 (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


Oct 30 2011 | 5:20 pm

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

Thanks for having a look

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

Forums > Jitter