Kriem
Kriem

Reputation: 8705

How to blend a quad, already with a texture on it

I made a quad with a nice texture on it. The texture has an alpha channel (RGBA). I replaced the quad with the texture (GL_REPLACE), so now I have a billboard with (semi)transparant pixels on it.

So far, no problem.

But now I want to blend the entire billboard, so it's overall opacity changes.

How would I do this?

Upvotes: 0

Views: 493

Answers (1)

Jay Kominek
Jay Kominek

Reputation: 8783

GL_MODULATE, instead of GL_REPLACE, after setting the color to solid white, with an appropriate amount of alpha. (glColor(1,1,1,0.5) for instance)

(Should work fine on OpenGL. Seems likely it'll be good on ES, too.)

Upvotes: 1

Related Questions