Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Merged r4992:4993 from branches/SDL-1.2: increased alpha blend accuracy.
  • Loading branch information
icculus committed Jan 10, 2010
1 parent 49fd936 commit 77ecf95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/video/SDL_blit.h
Expand Up @@ -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)


Expand Down

0 comments on commit 77ecf95

Please sign in to comment.