Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Blending modes???

This topic is 5652 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Do anyone know what every BlendFunc combination do??? I mean, i know the glBlendFunc(GL_ONE, GL_ONE) is for additive blending. I mean that every pixel''s color is added to the color buffer. What about other common combinations. If i read in a paper that i need to do multiplicative (!!!)blending, what glBlendFunc must i use??? Thanks in advance. And forgive my terrible English!!! HellRaiZer

Share this post

Link to post
Share on other sites
The equation is
(srcColor * srcOperand) operation (DestColor * destOperand)

SrcColor = the new fragmend( the triangle that you draw)
DestColor = The frame buffer ( what you drawn before)
srcOperand = the first argument in glBlendFunc
destOperand = the last argument in glBlendfunc

operation = always + if you dont set othervise with an extension (and if that case you know about it)

so for multiplaction blend we want

we can also write that as
result = (SrcColor * Destcolor) + (DestColor * 0);

and in code

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!