A
Akari
Guest
I'm try to implement PSX blending in OpenGL.
The trouble is I can't set texture alpha to 0.5 and 0.25 together. I set it to 0.5f.
// 0.5xB+0.5 x F
case BLEND_PSX_0: glBlendFunc(GL_SRC_ALPHA, GL_SRC_ALPHA); break;
// 1.0xB+1.0 x F
case BLEND_PSX_1: glBlendFunc(GL_ONE, GL_ONE); break;
// 1.0xB+0.25 x F (not this exactly)
case BLEND_PSX_3: glBlendFunc(GL_SRC_ALPHA, GL_ONE); break;
Can someone with good knowledge in OpenGL check if I'm right and help me to add 1.0xB-1.0 x F blending. And maybe fix my last blending.
The trouble is I can't set texture alpha to 0.5 and 0.25 together. I set it to 0.5f.
// 0.5xB+0.5 x F
case BLEND_PSX_0: glBlendFunc(GL_SRC_ALPHA, GL_SRC_ALPHA); break;
// 1.0xB+1.0 x F
case BLEND_PSX_1: glBlendFunc(GL_ONE, GL_ONE); break;
// 1.0xB+0.25 x F (not this exactly)
case BLEND_PSX_3: glBlendFunc(GL_SRC_ALPHA, GL_ONE); break;
Can someone with good knowledge in OpenGL check if I'm right and help me to add 1.0xB-1.0 x F blending. And maybe fix my last blending.