IPhone Cocos2D - list of blending modes available for sprite and how to set them

I am going to find a list of all the blending modes allowed by sprites on Cocos2D, but could not find it. Quartz can perform these blending modes, and I'm sure Cocos2D can do it too.

  • Modenormal
  • Modemultiply
  • Modescreen
  • Modeoverlay
  • Modearken
  • Modelighten
  • ModeColorDodge
  • ModeColorBurn
  • ModeSoftLight
  • Modehardlight
  • ModeDifference
  • ModeExclusion
  • Modehue
  • ModeSaturation
  • Modecolor
  • Modeluminosity

The only thing I could find on google was "additive", which I consider to be a screen. It is set like this:

[proxy setBlendFunc: (ccBlendFunc) { GL_SRC_ALPHA, GL_ONE }]; // example of additive blending 

I'm not even sure if this is a screen.

So, where can I find such a list and installation instructions for each of them?

thanks.

+4
source share
1 answer

Here you will find a detailed description of OpenGL blending modes . And if you want to try, there is a wonderful visual interactive tool glBlendFunc .

+9
source

Source: https://habr.com/ru/post/1380903/


All Articles