making a texture glow from another mask

I’ve tried both blending and multitexturing with different GL_TEXTURE_ENV_MODE functions but cannot get the effect right at all.

What i’m trying to do is to render a base texture with glowing highlights based on a second texture (acting as a mask). For example, imagine a texure of a circut board in color. Now imagine another texture with the actual circutry/wires across it. What I want to do is render that base circut board but make the areas masked through the second texture glow. It will give the effect of pulsating elctrical flow through those wires.

Is there a better way to do a similar effect.

I think additive blending will help. It depends on what color you want as well.

The second texture should have the highlighted texture and the base texture should have the circuits in black.

V-man

Is there a way not to modify the base texture? Let me be a bit clearer on this one:

What i did was get a color texture (base texture) and converted it to grayscale. Then i took that grayscale and adjusted the brightness and contrast so the dark areas were darker and the bright areas were brighter. This grayscale ‘mask’ I want to use to highlight the base texture. In essance I want to over saturate (is that the right term) the base texture in those areas that are bright in the mask. I really dont want the areas of the base texture to be modified by dark areas in the mask. I guess im just doing “addition” here.

All the things I’ve tried (I admit i havent looked into your above post yet) blend the dark areas of the mask with the base texture making everything too dark…

Your mask needs to have alpha=0 everywhere you want the base texture to show through and alpha=1 (255) where you want the mask to show through. Then, just do a simple alpha blend of (src * srcalpha + dst * 1-srcalpha). I forget the corresponding blend mode for ENV stuff, but it should be in the docs.

tried GL_ADD_SIGNED?