# define RGB_COLOR(r, g, b) (((uint32)(r) << 24) | ((uint32)(g) << 16) | ((uint32)(b) << 8))
typedef uint32 scrntype;
# elif defined(_RGBA888)
-//# if defined(USE_BITMAP)
-//# define RGB_COLOR(r, g, b) (((uint32)(r) << 24) | ((uint32)(g) << 16) | ((uint32)(b) << 8)) | ((uint32)((r | g | b) == 0x00) ? 0x00 : 0xff)
-//# else
-# define RGB_COLOR(r, g, b) (((uint32)(r) << 24) | ((uint32)(g) << 16) | ((uint32)(b) << 8)) | ((uint32)0xff << 0)
-//# endif
+//# define RGB_COLOR(r, g, b) (((uint32)(r) << 24) | ((uint32)(g) << 16) | ((uint32)(b) << 8)) | ((uint32)0xff << 0)
+# define RGB_COLOR(r, g, b) (((uint32)(b) << 24) | ((uint32)(g) << 16) | ((uint32)(r) << 8)) | ((uint32)0xff << 0)
typedef uint32 scrntype;
# endif
# define RGB_COLOR(r, g, b) (((uint32)(r) << 16) | ((uint32)(g) << 8) | ((uint32)(b) << 0))
typedef uint32 scrntype;
# elif defined(_RGBA888)
-# define RGB_COLOR(r, g, b) (((uint32)(r) << 16) | ((uint32)(g) << 8) | ((uint32)(b) << 0)) | ((uint32)0xff << 24)
-//# endif
+//# define RGB_COLOR(r, g, b) (((uint32)(r) << 16) | ((uint32)(g) << 8) | ((uint32)(b) << 0)) | ((uint32)0xff << 24)
+# define RGB_COLOR(r, g, b) (((uint32)(b) << 16) | ((uint32)(g) << 8) | ((uint32)(r) << 0)) | ((uint32)0xff << 24)
typedef uint32 scrntype;
# endif
{
// Set fragment color from texture
vec4 pixel_t = texture2D(a_texture, v_texcoord );
- vec4 pixel_r;
+ vec4 pixel_r = pixel_t;
vec4 c = vec4(chromakey, 1.0);
- pixel_r.b = pixel_t.r;
- pixel_r.r = pixel_t.b;
- pixel_r.g = pixel_t.g;
pixel_r.a = 1.0;
if(pixel_r != c) { // Chromakey;
vec4 pixel_t = texture2D(a_texture, v_texcoord );
vec4 pixel_r;
pixel_r = pixel_t * color;
- pixel_r.b = pixel_t.r;
- pixel_r.r = pixel_t.b;
- pixel_r.g = pixel_t.g;
-
gl_FragColor = pixel_r;
- // gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
}