[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Unexpected behavior from BLEND_RGBA_SUB




...

a quick test tells that , at pixel level, pygame 1.8.1release:

sf1                 sf2                sf1.blit(sf2,None,'BLEND_RGBA_SUB')

(r1,g1,b1,a1)  (r2,g2,b2,a2)   (clamp(r1-r2),clamp(g1-g2), clamp(b1-b2), 255)

Looks wrong to me, but there are not specs for the oper.

--

claxo

sorry, the prev aplies if both surfaces has no alpha channel.

When both surfaces have alpha channel ,the current behavoir is

sf1                 sf2                sf1.blit(sf2,None,'BLEND_RGBA_SUB')

(r1,g1,b1,a1)  (r2,g2,b2,a2)   (clamp(r1-r2),clamp(g1-g2), clamp(b1-b2), clamp(a1-a2))

Seems to follow the pattern of the BLEND_RGB , meaning an oper aplied per channel ion a separable fashion.

Not so usefull ?