blend multiple textures together

Started by
0 comments, last by zedzeek 18 years, 10 months ago
Hi there, I am trying to understand how the GL_BLEND works, but have some trouble blending a texture on the final scene... here is what i got: - I draw different textures on the screen/blend them together - There are black parts left that I want to fill with a "background-texture" - try to blend this texture to the parts of the screen, where the current color is black and not on the other parts my try was to blend it with "glBlendFunc(GL_ONE, GL_ONE);", that works nice for the black parts, but not for the already drawn parts, because the new texture gets blended with the old ones... do you guys know a way to do it properly? btw: i do have alpha-values available if that helps
Advertisement
u need to create an alpha channel + check what parts of the texture are black and set the alpha value to 0 if its not set it to 1
see here for an example of blending
uk.geocities.com/sloppyturds/stuff/opengl_blending.zip

This topic is closed to new replies.

Advertisement