mirror of
https://github.com/yawut/SDL.git
synced 2026-07-02 00:13:39 -05:00
Merged r4992:4993 from branches/SDL-1.2: increased alpha blend accuracy.
This commit is contained in:
parent
d3fddfb2b4
commit
23a7f67e85
|
|
@ -444,9 +444,9 @@ do { \
|
|||
/* Blend the RGB values of two Pixels based on a source alpha value */
|
||||
#define ALPHA_BLEND(sR, sG, sB, A, dR, dG, dB) \
|
||||
do { \
|
||||
dR = ((((int)(sR-dR)*(int)A)/255)+dR); \
|
||||
dG = ((((int)(sG-dG)*(int)A)/255)+dG); \
|
||||
dB = ((((int)(sB-dB)*(int)A)/255)+dB); \
|
||||
dR = (((((int)(sR-dR)*((int)A))+255)/255)+dR); \
|
||||
dG = (((((int)(sG-dG)*((int)A))+255)/255)+dG); \
|
||||
dB = (((((int)(sB-dB)*((int)A))+255)/255)+dB); \
|
||||
} while(0)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user