// 加算
// S + D
glBlendEquation( GL_FUNC_ADD );
// 減算
// S - D
glBlendEquation( GL_FUNC_SUBSTRACT );
// 減算
// D - S
glBlendEquation( GL_FUNC_REVERSE_SUBSTRACT );
// min, max
// min( S, D )
// max( S, D )
glBlendEquation( GL_MIN );
glBlendEquation( GL_MAX );
POINT
Alpha 成分の指定もすることになる
GL_ZERO
RGB A
( 0, 0, 0 ) 0
GL_ONE
RGB A
( 1, 1, 1 ) 1
GL_SRC_ALPHA
RGB A
( As, As, As ) As
GL_SRC_COLOR
RGB A
( Rs, Gs, Bs ) As
sfactor specifies which of nine methods is used to scale the source color components.
dfactor specifies which of eight methods is used to scale the destination color components.
The eleven possible methods are described in the following table.
Each method defines four scale factors, one each for red, green, blue, and alpha.
In the table and in subsequent equations, source and destination color components are referred to as ( Rs, Gs, Bs, As )
and ( Rd, Gd, Bd, Ad ). They are understood to have integer values between 0 and ( kR, kG, kB, kA ), where
kc = 2mc - 1
TIP
半透明の面を正しく描画するにはアプリケーションは次の順番で描画をする。
1. 不透明な面をかく
2. 半透明を 視点から遠い順にかく