Re: projective texturing/blending

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (dorbie++at++multipass.asd.sgi.com)
Wed, 18 Jun 1997 19:50:42 -0700


On Jun 18, 1:20pm, Daniel E. Small wrote:
> Subject: projective texturing/blending
> Hello performers,
>
> I have an infrared camera image that I'd like to project into a scene
> with other textured geometry. I would like to perform an addition
> between the projected image and the textures on the geometry to produce
> geometry texture that looks brighter (i.e. higher intensity) in the
> 'hot' (or white) spots of the infrared image. In the gl demo 'projtex.c'
> blending of the textures is controlled thru direct manipulation of the
> multipass process. Is there some combination of blending functions that
> would give me this desired effect?

Yes, use:

glBlendFunc(GL_ONE, GL_ONE);

in a draw callback for the projective thermal pass.

You'd also have to enable alpha blending but the safest approach in a
performer draw callback would be to do this:

pfTransparency(PFTR_BLEND_ALPHA);
pfOverride(PFSTATE_TRANSPARENCY, PF_ON);
glBlendFunc(GL_ONE, GL_ONE);
// also consider a glPolygonOffsetEXT call if needed, remember to undo

Then in the post draw you probably want to do something like:

pfOverride(PFSTATE_TRANSPARENCY, PF_OFF);

You may also want to issue the normal src alpha, one minus src alpha
in the post draw but that will depend on what else you do in the
application and the scene graph.

Cheers,Angus.

-- 
__________________________________________
http://www.intergraph.com/press97/q197.htm
__________________________________________
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:28 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.