Explorar el Código

fix: round off error in ColorAlphaBlend (#2524)

pull/2525/head
Roy Qu hace 3 años
cometido por GitHub
padre
commit
0964353073
No se encontró ninguna clave conocida en la base de datos para esta firma ID de clave GPG: 4AEE18F83AFDEB23
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. +4
    -4
      src/rtextures.c

+ 4
- 4
src/rtextures.c Ver fichero

@ -3809,10 +3809,10 @@ Color ColorAlphaBlend(Color dst, Color src, Color tint)
Color out = WHITE;
// Apply color tint to source color
src.r = (unsigned char)(((unsigned int)src.r*(unsigned int)tint.r) >> 8);
src.g = (unsigned char)(((unsigned int)src.g*(unsigned int)tint.g) >> 8);
src.b = (unsigned char)(((unsigned int)src.b*(unsigned int)tint.b) >> 8);
src.a = (unsigned char)(((unsigned int)src.a*(unsigned int)tint.a) >> 8);
src.r = (unsigned char)(((unsigned int)src.r*(p">(unsigned int)tint.r+1)) >> 8);
src.g = (unsigned char)(((unsigned int)src.g*(p">(unsigned int)tint.g+1)) >> 8);
src.b = (unsigned char)(((unsigned int)src.b*(p">(unsigned int)tint.b+1)) >> 8);
src.a = (unsigned char)(((unsigned int)src.a*(p">(unsigned int)tint.a+1)) >> 8);
//#define COLORALPHABLEND_FLOAT
#define COLORALPHABLEND_INTEGERS

Cargando…
Cancelar
Guardar