Hello developers,
I have a unwanted effect with blending. Maybe you have any ideas to solve my problem.
I start with a black background and alpha 0.0 (completely transparent). Then I draw a blue rectangle with texture alpha 1.0 (opaque). Finally, I draw a half-transparent red square with texture alpha 0.5, that is partly on the blue rectangle. (Use EMT_TRANSPARENT_ALPHA_CHANNEL)
When I draw into the frame buffer, everything is fine. But when I draw into a real time texture, I have an bad effect of the alpha there.
The black area has alpha 0.0 ==> ok
The blue area has alpha 1.0 ==> ok
The dark red area has alpha 0.5 ==> ok
The violet area has alpha 0.5 ==> not ok!
That’s because the alpha for the whole square is set to 0.5 (source alpha). It’s seems to be not relevant, what the alpha of the destination pixels is.
(Irrlicht 1.8.1, OpenGL, Windows with MinGW and Linux)
I require texture alpha blending. But it should set the new alpha to “MAX(srcAlpha, destAlpha)”. What can I do?
(I “googled” a bit and found the OpenGL function “glBlendFuncSeparate”. This may be the solution for my requirement. How do I use it?)
alpha result after blending in rtt
Re: alpha result after blending in rtt
Irr does not currently support separate blending for alpha and color.