Color Blending Exploration

In OpenGL and ShaderLab you can customize the way that blending is done.  In ShaderLab you use the Blend keyword and in OpenGL you would use glBlendFunc or glBlendFuncSeperate.  Notice that ShaderLab can do like glBlendFuncSeperate, you just have to supply more arguments [1].

Someone has developed a nice visualization that can be used to explore the settings for these functions:  http://www.andersriggelsen.dk/glblendfunc.php

Wikipedia also has a nice section on alpha blending that is worth checking out: https://en.wikipedia.org/wiki/Alpha_compositing#Alpha_blending

Checking out the man page for glBlendFunc is always helpful too: https://www.khronos.org/opengles/sdk/1.1/docs/man/glBlendFunc.xml

References:
  1. http://docs.unity3d.com/Manual/SL-Blend.html

Leave a Reply

Your email address will not be published. Required fields are marked *