-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Matteo Sisti Sette wrote:
Hi,
Now, I don't know if this is possible at all.
Suppose I have a [rectangle] (or whatever primitive indeed) with a texture, and something behind the rectangle. Is it possible to have the rectangle "blend" with the background with some blending mode (such as add, multiply, etc)? (without having to render all the rest of the scene except the rectangle into a texture via gemframebuffer, and then blending the two textures with pix_add and friends)???
there's [env $1( (with $1=0..5 or so) to [pix_texture] which will give you a number of different blending modes.
there's a bug in the released versions of Gem, that will set the blending mode for all texture blendings. so you might want to reset it after you changed it. should be fixed in svn/trunk.
then you can (in a very limited way) change the general blending function (no tex involved) by sending a number to the 2nd inlet to [alpha]. if you want more control, use [GEMglBlendFunc] (and get a copy of the openGL red book to see what it does and what you can do)
Isn't it a matter of shaders? I guess it could be achieved using openGL functions... but is there a "simple" way?
that will give you all the flexibility in the world.
fgamsdr IOhannes