开发者

OpenGL DECAL Texture on a Transparent Quad?

I have an OpenGL texture with transparent and opaque pixels (eg, texture contains a circle, area outside the circle is transparent with alpha of 0.0).

I'm mapping this texture to a simple quad using GL_DECAL mode, and it works-- the transparent parts of the texture are invisible, and I see my circle against the background of the quad.

Now I wan开发者_如何学Got to make the quad transparent. When I do this, though, the texture takes on the transparency values of the underlying quad, so when I set the quad to "fully transparent" with 0.0 alpha, the texture is invisible.

How do I make the QUAD transparent, but keep the opaque portions of the TEXTURE visible?

Many thanks...


I am not an expert, and I do not have time to try but instead of GL_DECAL, I think using GL_REPLACE will work for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜