Hi list,
I am much playing around with alpha blending in Gem these days and I was wondering how I could change the default blending mode between geos. I think it is feasable with openGL objects, but there are only two openGL examples in the example/help patches.
The default blending mode between geos is "add". I would like to set it to "multiply" in some cases and "mask", so that when we are viewing a geo with a pix texture on it, we don't see the other geos' pix textures behind it ? I am sure this is possible. How ?
regards,
aalex
glBlendFunc() There is a whole section on it in the RedBook.
Fragment shaders are also useful for this.
On 5/8/06, Alexandre Quessy listes@sourcelibre.com wrote:
Hi list,
I am much playing around with alpha blending in Gem these days and I was wondering how I could change the default blending mode between geos. I think it is feasable with openGL objects, but there are only two openGL examples in the example/help patches.
The default blending mode between geos is "add". I would like to set it to "multiply" in some cases and "mask", so that when we are viewing a geo with a pix texture on it, we don't see the other geos' pix textures behind it ? I am sure this is possible. How ?
regards,
aalex
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hem, which red book ? sorrry.
So, if I understand well : "Transparency is best implemented using blend function (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) with primitives sorted from farthest to nearest." ?
Taken from http://www.mevis.de/opengl/glBlendFunc.html
;-)
Thanks, tigital and Chris.
By the way, James, should I always replace the Gem that is bundled with Hans installer for your Gem version (from your Mac.com site) ?
aalex
On 5/8/06, chris clepper cgc@humboldtblvd.com wrote:
glBlendFunc() There is a whole section on it in the RedBook.
Fragment shaders are also useful for this.
On 5/8/06, Alexandre Quessy listes@sourcelibre.com wrote:
Hi list,
I am much playing around with alpha blending in Gem these days and I was wondering how I could change the default blending mode between geos. I think it is feasable with openGL objects, but there are only two openGL examples in the example/help patches.
The default blending mode between geos is "add". I would like to set it to "multiply" in some cases and "mask", so that when we are viewing a geo with a pix texture on it, we don't see the other geos' pix textures behind it ? I am sure this is possible. How ?
regards,
aalex
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
http://fly.srk.fer.hr/~unreal/theredbook/
I see which red book now.... I think I will make a xscreensacer hello world. Then, my Gem skills are gonna be better.
:-)
On 5/10/06, Alexandre Quessy listes@sourcelibre.com wrote:
Hem, which red book ? sorrry.
So, if I understand well : "Transparency is best implemented using blend function (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) with primitives sorted from farthest to nearest." ?
Taken from http://www.mevis.de/opengl/glBlendFunc.html
;-)
Thanks, tigital and Chris.
By the way, James, should I always replace the Gem that is bundled with Hans installer for your Gem version (from your Mac.com site) ?
aalex
On 5/8/06, chris clepper cgc@humboldtblvd.com wrote:
glBlendFunc() There is a whole section on it in the RedBook.
Fragment shaders are also useful for this.
On 5/8/06, Alexandre Quessy listes@sourcelibre.com wrote:
Hi list,
I am much playing around with alpha blending in Gem these days and I was wondering how I could change the default blending mode between geos. I think it is feasable with openGL objects, but there are only two openGL examples in the example/help patches.
The default blending mode between geos is "add". I would like to set it to "multiply" in some cases and "mask", so that when we are viewing a geo with a pix texture on it, we don't see the other geos' pix textures behind it ? I am sure this is possible. How ?
regards,
aalex
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On 5/10/06, Alexandre Quessy listes@sourcelibre.com wrote:
Hem, which red book ? sorrry.
http://glprogramming.com/red/chapter06.html http://www.amazon.com/gp/product/0321335732/ref=pd_lpo_k2a_2_txt/104-4458908...
So, if I understand well : "Transparency is best implemented using
blend function (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) with primitives sorted from farthest to nearest." ?
Good luck on that primitive sorting in GEM.
Taken from http://www.mevis.de/opengl/glBlendFunc.html
That would be the spec out of the Blue Book.
cgc
On May 8, 2006, at 3:03 PM, Alexandre Quessy wrote:
The default blending mode between geos is "add". I would like to set it to "multiply" in some cases and "mask", so that when we are viewing a geo with a pix texture on it, we don't see the other geos' pix textures behind it ? I am sure this is possible. How ?
...actually the default mode is "modulate", where it the texture is
modulated by the surface color of the geo...the I recently added
support for this (ie. glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE,
m_env) )in gem cvs (and the pix_texture.pd help patch covers it):
basically you just send an [env $1< to [pix_texture], with the
following supported values:
0=GL_REPLACE 1=GL_DECAL 2=GL_BLEND 3=GL_ADD 4=GL_COMBINE
4=GL_MODULATE (default)
...alternatively, if yr just looking to play with blending, you could
use [GEMglBlendFunc] and [GEMglBlendEquation]...looks like we need to
add wrappers for glBlendFuncSeparate(), glBlendColor(), and
glBlendEquationSeparate() (putting it on the to-do.91)...
jamie