|
@@ -69,13 +69,13 @@ static const Uint8 GLES2_FragmentSrc_SolidSrc_[] = " \
|
|
static const Uint8 GLES2_FragmentSrc_TextureABGRSrc_[] = " \
|
|
static const Uint8 GLES2_FragmentSrc_TextureABGRSrc_[] = " \
|
|
precision mediump float; \
|
|
precision mediump float; \
|
|
uniform sampler2D u_texture; \
|
|
uniform sampler2D u_texture; \
|
|
- uniform vec4 u_modulation; \
|
|
|
|
|
|
+ uniform vec4 u_color; \
|
|
varying vec2 v_texCoord; \
|
|
varying vec2 v_texCoord; \
|
|
\
|
|
\
|
|
void main() \
|
|
void main() \
|
|
{ \
|
|
{ \
|
|
gl_FragColor = texture2D(u_texture, v_texCoord); \
|
|
gl_FragColor = texture2D(u_texture, v_texCoord); \
|
|
- gl_FragColor *= u_modulation; \
|
|
|
|
|
|
+ gl_FragColor *= u_color; \
|
|
} \
|
|
} \
|
|
";
|
|
";
|
|
|
|
|
|
@@ -83,7 +83,7 @@ static const Uint8 GLES2_FragmentSrc_TextureABGRSrc_[] = " \
|
|
static const Uint8 GLES2_FragmentSrc_TextureARGBSrc_[] = " \
|
|
static const Uint8 GLES2_FragmentSrc_TextureARGBSrc_[] = " \
|
|
precision mediump float; \
|
|
precision mediump float; \
|
|
uniform sampler2D u_texture; \
|
|
uniform sampler2D u_texture; \
|
|
- uniform vec4 u_modulation; \
|
|
|
|
|
|
+ uniform vec4 u_color; \
|
|
varying vec2 v_texCoord; \
|
|
varying vec2 v_texCoord; \
|
|
\
|
|
\
|
|
void main() \
|
|
void main() \
|
|
@@ -92,7 +92,7 @@ static const Uint8 GLES2_FragmentSrc_TextureARGBSrc_[] = " \
|
|
gl_FragColor = abgr; \
|
|
gl_FragColor = abgr; \
|
|
gl_FragColor.r = abgr.b; \
|
|
gl_FragColor.r = abgr.b; \
|
|
gl_FragColor.b = abgr.r; \
|
|
gl_FragColor.b = abgr.r; \
|
|
- gl_FragColor *= u_modulation; \
|
|
|
|
|
|
+ gl_FragColor *= u_color; \
|
|
} \
|
|
} \
|
|
";
|
|
";
|
|
|
|
|
|
@@ -100,7 +100,7 @@ static const Uint8 GLES2_FragmentSrc_TextureARGBSrc_[] = " \
|
|
static const Uint8 GLES2_FragmentSrc_TextureRGBSrc_[] = " \
|
|
static const Uint8 GLES2_FragmentSrc_TextureRGBSrc_[] = " \
|
|
precision mediump float; \
|
|
precision mediump float; \
|
|
uniform sampler2D u_texture; \
|
|
uniform sampler2D u_texture; \
|
|
- uniform vec4 u_modulation; \
|
|
|
|
|
|
+ uniform vec4 u_color; \
|
|
varying vec2 v_texCoord; \
|
|
varying vec2 v_texCoord; \
|
|
\
|
|
\
|
|
void main() \
|
|
void main() \
|
|
@@ -110,7 +110,7 @@ static const Uint8 GLES2_FragmentSrc_TextureRGBSrc_[] = " \
|
|
gl_FragColor.r = abgr.b; \
|
|
gl_FragColor.r = abgr.b; \
|
|
gl_FragColor.b = abgr.r; \
|
|
gl_FragColor.b = abgr.r; \
|
|
gl_FragColor.a = 1.0; \
|
|
gl_FragColor.a = 1.0; \
|
|
- gl_FragColor *= u_modulation; \
|
|
|
|
|
|
+ gl_FragColor *= u_color; \
|
|
} \
|
|
} \
|
|
";
|
|
";
|
|
|
|
|
|
@@ -118,7 +118,7 @@ static const Uint8 GLES2_FragmentSrc_TextureRGBSrc_[] = " \
|
|
static const Uint8 GLES2_FragmentSrc_TextureBGRSrc_[] = " \
|
|
static const Uint8 GLES2_FragmentSrc_TextureBGRSrc_[] = " \
|
|
precision mediump float; \
|
|
precision mediump float; \
|
|
uniform sampler2D u_texture; \
|
|
uniform sampler2D u_texture; \
|
|
- uniform vec4 u_modulation; \
|
|
|
|
|
|
+ uniform vec4 u_color; \
|
|
varying vec2 v_texCoord; \
|
|
varying vec2 v_texCoord; \
|
|
\
|
|
\
|
|
void main() \
|
|
void main() \
|
|
@@ -126,7 +126,7 @@ static const Uint8 GLES2_FragmentSrc_TextureBGRSrc_[] = " \
|
|
vec4 abgr = texture2D(u_texture, v_texCoord); \
|
|
vec4 abgr = texture2D(u_texture, v_texCoord); \
|
|
gl_FragColor = abgr; \
|
|
gl_FragColor = abgr; \
|
|
gl_FragColor.a = 1.0; \
|
|
gl_FragColor.a = 1.0; \
|
|
- gl_FragColor *= u_modulation; \
|
|
|
|
|
|
+ gl_FragColor *= u_color; \
|
|
} \
|
|
} \
|
|
";
|
|
";
|
|
|
|
|
|
@@ -163,7 +163,7 @@ static const Uint8 GLES2_FragmentSrc_TextureBGRSrc_[] = " \
|
|
"uniform sampler2D u_texture;\n" \
|
|
"uniform sampler2D u_texture;\n" \
|
|
"uniform sampler2D u_texture_u;\n" \
|
|
"uniform sampler2D u_texture_u;\n" \
|
|
"uniform sampler2D u_texture_v;\n" \
|
|
"uniform sampler2D u_texture_v;\n" \
|
|
-"uniform vec4 u_modulation;\n" \
|
|
|
|
|
|
+"uniform vec4 u_color;\n" \
|
|
"varying vec2 v_texCoord;\n" \
|
|
"varying vec2 v_texCoord;\n" \
|
|
"\n" \
|
|
"\n" \
|
|
|
|
|
|
@@ -185,7 +185,7 @@ static const Uint8 GLES2_FragmentSrc_TextureBGRSrc_[] = " \
|
|
"\n" \
|
|
"\n" \
|
|
" // That was easy. :) \n" \
|
|
" // That was easy. :) \n" \
|
|
" gl_FragColor = vec4(rgb, 1);\n" \
|
|
" gl_FragColor = vec4(rgb, 1);\n" \
|
|
-" gl_FragColor *= u_modulation;\n" \
|
|
|
|
|
|
+" gl_FragColor *= u_color;\n" \
|
|
"}" \
|
|
"}" \
|
|
|
|
|
|
#define NV12_SHADER_BODY \
|
|
#define NV12_SHADER_BODY \
|
|
@@ -205,7 +205,7 @@ static const Uint8 GLES2_FragmentSrc_TextureBGRSrc_[] = " \
|
|
"\n" \
|
|
"\n" \
|
|
" // That was easy. :) \n" \
|
|
" // That was easy. :) \n" \
|
|
" gl_FragColor = vec4(rgb, 1);\n" \
|
|
" gl_FragColor = vec4(rgb, 1);\n" \
|
|
-" gl_FragColor *= u_modulation;\n" \
|
|
|
|
|
|
+" gl_FragColor *= u_color;\n" \
|
|
"}" \
|
|
"}" \
|
|
|
|
|
|
#define NV21_SHADER_BODY \
|
|
#define NV21_SHADER_BODY \
|
|
@@ -225,7 +225,7 @@ static const Uint8 GLES2_FragmentSrc_TextureBGRSrc_[] = " \
|
|
"\n" \
|
|
"\n" \
|
|
" // That was easy. :) \n" \
|
|
" // That was easy. :) \n" \
|
|
" gl_FragColor = vec4(rgb, 1);\n" \
|
|
" gl_FragColor = vec4(rgb, 1);\n" \
|
|
-" gl_FragColor *= u_modulation;\n" \
|
|
|
|
|
|
+" gl_FragColor *= u_color;\n" \
|
|
"}" \
|
|
"}" \
|
|
|
|
|
|
/* YUV to ABGR conversion */
|
|
/* YUV to ABGR conversion */
|
|
@@ -284,13 +284,13 @@ static const Uint8 GLES2_FragmentSrc_TextureExternalOESSrc_[] = " \
|
|
#extension GL_OES_EGL_image_external : require\n\
|
|
#extension GL_OES_EGL_image_external : require\n\
|
|
precision mediump float; \
|
|
precision mediump float; \
|
|
uniform samplerExternalOES u_texture; \
|
|
uniform samplerExternalOES u_texture; \
|
|
- uniform vec4 u_modulation; \
|
|
|
|
|
|
+ uniform vec4 u_color; \
|
|
varying vec2 v_texCoord; \
|
|
varying vec2 v_texCoord; \
|
|
\
|
|
\
|
|
void main() \
|
|
void main() \
|
|
{ \
|
|
{ \
|
|
gl_FragColor = texture2D(u_texture, v_texCoord); \
|
|
gl_FragColor = texture2D(u_texture, v_texCoord); \
|
|
- gl_FragColor *= u_modulation; \
|
|
|
|
|
|
+ gl_FragColor *= u_color; \
|
|
} \
|
|
} \
|
|
";
|
|
";
|
|
|
|
|