Skip to main content
gamedev.net
🔒 Locked

blending

Started by Troodon Jul 13, 2006 at 6:29 PM 1 replies 850+ views
Original Post
Troodon
Troodon
Hey everybody! I'm trying to implement variable addictive and subtractive alpha blending, but I fail on pretty much everything. I do get something that could be addictive but I still can not change the amount of blending that takes place. If anybody know a good tutorial for implementing various kind of blending techiques I would be very greatful. Please help me with this one. Thanks in advance!
nts
nts
I don't know of a tutorial but you can use 'glColor4f' to change the blending factor. The inputs are the RGB colors and the alpha (eg. 1 for fully opaque and 0 for fully transparent).

Hope that helps
Troodon
Troodon
I have already tried that.

The funny thing is that when I'm using glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_BLEND) the colors seems inverted, but the blending factor (ie. the alpha component on glColor4ub(255, 255, 255, color_value)) seems to respond in some odd kind of way. And whenever I use GL_MODULATE the textures seem ok and addictive blending do happen, but I can't control it via the glColor4ub.

The subtractive blending doesn't work at all :(

I don't know what to do!

By the way, I'm using the sdl_opengl library.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.