blending same color together

Member
Posts: 306
Joined: 2009.03
Post: #1
I have 2 pngs of the same color of grey. They each have partial transparency around their edge. When they overlap instead of merging to form one grey blob they have a black edge visible where they meet. Is this because of a blend mode issue or the premultiplied alpha thing that happens with UIImage? Or something else...
Quote this message in a reply
Member
Posts: 306
Joined: 2009.03
Post: #2
it was the blend function, changing to GL_ONE, GL_ONE_MINUS_SRC_ALPHA solved it.
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #3
Actually it was both the blend function and premultiplication. Wink

You simply changed the blend function to assume a pre multiplied image.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Post Reply