<<< Specifying How to Blend | Index | Blending Example >>> |
Enabled by
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
Take source and multiply rgb (colors) by its alpha value
Take destination and multiply rgb by (1-source alpha)
Blending calculation example:
Cd = ( 1.0f, 0.0f, 0.0f, 1.0f ) // Red Cs = ( 0.0f, 0.0f, 1.0f, 0.6f ) // Blue, with source alpha 0.6 D = 1.0f – 0.6 == 0.4f Cf = ( Blue * 0.6 ) + ( Red * 0.4 )
<<< Specifying How to Blend | Index | Blending Example >>> |