I'm trying to paint a texture on to a plane and use that texture's alpha
and luminance on the plane while still using the plane's original color.
I load the texture, and then color4f(.5, .2, .2, 1.0), and i want to get a
texture out that is transparent where the texture is transparent and the
color the most intense where the texture is the most intense.
For example, I have a blotch of texture thats only a little more than a
sphere, and I use that as my intensity on my plane, I want the color to
appear most intense on that blotch, and less intense(or even black)
elseware. Moreover, I built a gaussian function for alpha to blend things
away the further they are from the center of the texture. So after I
loaded the image, I tore it apart 32 bit integer by 32 bit integer, pulled
out the alpha, multiplied it by my gaussian function and shoved it back
in. The function works, I've printed out the alpha channel to the console
and it looks veyr much like it should.
My problem is that none of this seems to work. I seem to be able to get
the intensity from my texture, but not the transparency, either my
textures are only about half transparent, or totally opaque, but not
totally transparent. I need these planes to be totally transparent at the
edges to blend better with one another, but right now all I'm getting is a
bunch of half transparent planes that obviously look like planes.
My blending function is (GL_ONE, GL_ONE_MINUS_SRC_ALPHA), and my texturing
I realize these functions would probably throw out the texture's
intensity, I wasn't using them when I had the intensity working. I just
gave up on everything but getting the alpha to work.
Thanks for anything you can help with,