Hello guys,
I’m trying to understand how GL_SRC_COLOR works.
The scale factors are defined in the docs as:
Parameter (fR , fG , fB , fA )
GL_ZERO (0,0,0,0)
GL_ONE (1,1,1,1)
GL_SRC_COLOR (Rs / kR , Gs / kG , Bs / kB , As / kA )
GL_DST_COLOR (Rd / kR , Gd / kG , Bd / kB , Ad / kA )
The docs also say: “They are understood to have integer values between zero and (kR , kG , kB , kA ), where
kR = 2mR - 1
kG = 2mG - 1
kB = 2mB - 1
kA = 2mA - 1
and (mR , mG , mB , mA ) is the number of red, green, blue, and alpha bitplanes.”
As far as I understand, kR-G-B-A are in this range: [0, 255]. I don’t get how the scale factors will be calculated then.
Let’s say the source color I have is (0.5, 0.5, 0.5, 0.5) and the dest color is (0.1, 0.2, 0.3, 0.4).
If I specify the blend func as (GL_SRC_COLOR, GL_DST_COLOR) and blend equation is ADD, what would be the final color?
Thank you!
Truong