Evas: Filter: Add the shaders - nice and safe change here.

SVN revision: 58725
This commit is contained in:
Brett Nash 2011-04-19 05:47:51 +00:00
parent 72d667e8d9
commit 36370ae91e
24 changed files with 286 additions and 0 deletions

View File

@ -0,0 +1,11 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"uniform sampler2D tex;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
"void main()\n"
"{\n"
" float inten = dot(texture2D(tex,tex_c.xy).agb,vec3(.3, .59, .11));\n"
" gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).r) * col;\n"
"}\n"

View File

@ -0,0 +1,11 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D tex;
varying vec4 col;
varying vec2 tex_c;
void main()
{
float inten = dot(texture2D(tex,tex_c.xy).agb,vec3(.3, .59, .11));
gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).r) * col;
}

View File

@ -0,0 +1,11 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"uniform sampler2D tex;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
"void main()\n"
"{\n"
" float inten = dot(texture2D(tex,tex_c.xy).rgb,vec3(.3, .59, .11));\n"
" gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).a) * col;\n"
"}\n"

View File

@ -0,0 +1,11 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D tex;
varying vec4 col;
varying vec2 tex_c;
void main()
{
float inten = dot(texture2D(tex,tex_c.xy).rgb,vec3(.3, .59, .11));
gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).a) * col;
}

View File

@ -0,0 +1,10 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"uniform sampler2D tex;\n"
"varying vec2 tex_c;\n"
"void main()\n"
"{\n"
" float inten = dot(texture2D(tex,tex_c.xy).rgb,vec3(.3, .59, .11));\n"
" gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).a);\n"
"}\n"

View File

@ -0,0 +1,10 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D tex;
varying vec2 tex_c;
void main()
{
float inten = dot(texture2D(tex,tex_c.xy).rgb,vec3(.3, .59, .11));
gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).a);
}

View File

@ -0,0 +1,10 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"uniform sampler2D tex;\n"
"varying vec2 tex_c;\n"
"void main()\n"
"{\n"
" float inten = dot(texture2D(tex,tex_c.xy).abg,vec3(.3, .59, .11));\n"
" gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).r);\n"
"}\n"

View File

@ -0,0 +1,10 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D tex;
varying vec2 tex_c;
void main()
{
float inten = dot(texture2D(tex,tex_c.xy).abg,vec3(.3, .59, .11));
gl_FragColor = vec4(inten, inten, inten, texture2D(tex,tex_c.xy).r);
}

View File

@ -0,0 +1,10 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"uniform sampler2D tex;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
"void main()\n"
"{\n"
" gl_FragColor = (vec4(0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy).bgra)*col;\n"
"}\n"

View File

@ -0,0 +1,10 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D tex;
varying vec4 col;
varying vec2 tex_c;
void main()
{
gl_FragColor = (vec4(0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy).bgra)*col;
}

View File

@ -0,0 +1,10 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"uniform sampler2D tex;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
"void main()\n"
"{\n"
" gl_FragColor = (vec4(1.0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy))*col;\n"
"}\n"

View File

@ -0,0 +1,10 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D tex;
varying vec4 col;
varying vec2 tex_c;
void main()
{
gl_FragColor = (vec4(1.0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy))*col;
}

View File

@ -0,0 +1,11 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"uniform sampler2D tex;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
"void main()\n"
"{\n"
" vec3 inv = vec3(1.0, 1.0, 1.0) - texture2D(tex,tex_c.xy).rgb;\n"
" gl_FragColor = vec4(inv.r, inv.g, inv.b, 1.0);\n"
"}\n"

View File

@ -0,0 +1,11 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D tex;
varying vec4 col;
varying vec2 tex_c;
void main()
{
vec3 inv = vec3(1.0, 1.0, 1.0) - texture2D(tex,tex_c.xy).rgb;
gl_FragColor = vec4(inv.r, inv.g, inv.b, 1.0);
}

View File

@ -0,0 +1,10 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"uniform sampler2D tex;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
"void main()\n"
"{\n"
" gl_FragColor = (vec4(0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy).bgra)*col;\n"
"}\n"

View File

@ -0,0 +1,10 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D tex;
varying vec4 col;
varying vec2 tex_c;
void main()
{
gl_FragColor = (vec4(0, 1.0, 1.0, 1.0) - texture2D(tex, tex_c.xy).bgra)*col;
}

View File

@ -0,0 +1,16 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"uniform sampler2D tex;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
"void main()\n"
"{\n"
" vec3 inp = texture2D(tex,tex_c.xy).abg;\n"
" vec4 sep;\n"
" sep.r = dot(inp, vec3(.393, .769, .189));\n"
" sep.g = dot(inp, vec3(.349, .686, .168));\n"
" sep.b = dot(inp, vec3(.272, .534, .131));\n"
" sep.a = texture2D(tex,tex_c.xy).r;\n"
" gl_FragColor = sep * col;\n"
"}\n"

View File

@ -0,0 +1,16 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D tex;
varying vec4 col;
varying vec2 tex_c;
void main()
{
vec3 inp = texture2D(tex,tex_c.xy).abg;
vec4 sep;
sep.r = dot(inp, vec3(.393, .769, .189));
sep.g = dot(inp, vec3(.349, .686, .168));
sep.b = dot(inp, vec3(.272, .534, .131));
sep.a = texture2D(tex,tex_c.xy).r;
gl_FragColor = sep * col;
}

View File

@ -0,0 +1,16 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"uniform sampler2D tex;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
"void main()\n"
"{\n"
" vec3 inp = texture2D(tex,tex_c.xy).rgb;\n"
" vec4 sep;\n"
" sep.r = dot(inp, vec3(.393, .769, .189));\n"
" sep.g = dot(inp, vec3(.349, .686, .168));\n"
" sep.b = dot(inp, vec3(.272, .534, .131));\n"
" sep.a = texture2D(tex,tex_c.xy).a;\n"
" gl_FragColor = sep * col;\n"
"}\n"

View File

@ -0,0 +1,16 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D tex;
varying vec4 col;
varying vec2 tex_c;
void main()
{
vec3 inp = texture2D(tex,tex_c.xy).rgb;
vec4 sep;
sep.r = dot(inp, vec3(.393, .769, .189));
sep.g = dot(inp, vec3(.349, .686, .168));
sep.b = dot(inp, vec3(.272, .534, .131));
sep.a = texture2D(tex,tex_c.xy).a;
gl_FragColor = sep * col;
}

View File

@ -0,0 +1,14 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"uniform sampler2D tex;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
"void main()\n"
"{\n"
" vec3 inp = texture2D(tex,tex_c.xy).rgb;\n"
" gl_FragColor.r = dot(inp, vec3(.393, .769, .189));\n"
" gl_FragColor.g = dot(inp, vec3(.349, .686, .168));\n"
" gl_FragColor.b = dot(inp, vec3(.272, .534, .131));\n"
" gl_FragColor.a = texture2D(tex,tex_c.xy).a;\n"
"}\n"

View File

@ -0,0 +1,14 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D tex;
varying vec4 col;
varying vec2 tex_c;
void main()
{
vec3 inp = texture2D(tex,tex_c.xy).rgb;
gl_FragColor.r = dot(inp, vec3(.393, .769, .189));
gl_FragColor.g = dot(inp, vec3(.349, .686, .168));
gl_FragColor.b = dot(inp, vec3(.272, .534, .131));
gl_FragColor.a = texture2D(tex,tex_c.xy).a;
}

View File

@ -0,0 +1,14 @@
"#ifdef GL_ES\n"
"precision mediump float;\n"
"#endif\n"
"uniform sampler2D tex;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
"void main()\n"
"{\n"
" vec3 inp = texture2D(tex,tex_c.xy).abg;\n"
" gl_FragColor.r = dot(inp, vec3(.393, .769, .189));\n"
" gl_FragColor.g = dot(inp, vec3(.349, .686, .168));\n"
" gl_FragColor.b = dot(inp, vec3(.272, .534, .131));\n"
" gl_FragColor.a = texture2D(tex,tex_c.xy).r;\n"
"}\n"

View File

@ -0,0 +1,14 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D tex;
varying vec4 col;
varying vec2 tex_c;
void main()
{
vec3 inp = texture2D(tex,tex_c.xy).abg;
gl_FragColor.r = dot(inp, vec3(.393, .769, .189));
gl_FragColor.g = dot(inp, vec3(.349, .686, .168));
gl_FragColor.b = dot(inp, vec3(.272, .534, .131));
gl_FragColor.a = texture2D(tex,tex_c.xy).r;
}