summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-10-18 12:49:11 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-10-18 12:49:11 +0900
commit7b568a61529e2f96882e0bfe9ba21edf35e40766 (patch)
treef66c7b944bae55f6f9405dd394d481573059fd14 /src
parent94ebd96df509c36a8d0d12b3e5c9befbf0287441 (diff)
evas gl fix color on bigendian with gl engine
this fixes rendering on ppc (bigendian) where we have thnigs swizzled oddly. not bgra -> argb but rgba -> grab ... so generate a bigendian shader file and use if on bigendian. this should fix T2721 it fixes it in the visual screenshots i can get remotely.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile_Evas.am5
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_define.h3
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_shader.c7
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_texture.c8
-rw-r--r--src/modules/evas/engines/gl_common/shader/evas_gl_shaders_bigendian.x9289
-rw-r--r--src/modules/evas/engines/gl_common/shader/fragment.glsl12
-rwxr-xr-xsrc/modules/evas/engines/gl_common/shader/gen_shaders.sh4
7 files changed, 9324 insertions, 4 deletions
diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index 0e08495..66add14 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -680,6 +680,7 @@ modules/evas/engines/gl_common/evas_gl_api_gles1.c \
680modules/evas/engines/gl_common/evas_gl_api_gles3_def.h \ 680modules/evas/engines/gl_common/evas_gl_api_gles3_def.h \
681modules/evas/engines/gl_common/evas_gl_api_ext.c \ 681modules/evas/engines/gl_common/evas_gl_api_ext.c \
682modules/evas/engines/gl_common/shader/evas_gl_shaders.x \ 682modules/evas/engines/gl_common/shader/evas_gl_shaders.x \
683modules/evas/engines/gl_common/shader/evas_gl_shaders_bigendian.x \
683modules/evas/engines/gl_common/shader_3d/evas_gl_3d_shaders.x \ 684modules/evas/engines/gl_common/shader_3d/evas_gl_3d_shaders.x \
684modules/evas/engines/gl_common/shader/evas_gl_enum.x 685modules/evas/engines/gl_common/shader/evas_gl_enum.x
685 686
@@ -705,6 +706,10 @@ modules/evas/engines/gl_common/shader/evas_gl_shaders.x: $(GL_SHADERS_GEN)
705 @echo " SHADERS $@" 706 @echo " SHADERS $@"
706 @bash $(srcdir)/modules/evas/engines/gl_common/shader/gen_shaders.sh 707 @bash $(srcdir)/modules/evas/engines/gl_common/shader/gen_shaders.sh
707 708
709modules/evas/engines/gl_common/shader/evas_gl_shaders_bigendian.x: $(GL_SHADERS_GEN)
710 @echo " SHADERS $@"
711 @bash $(srcdir)/modules/evas/engines/gl_common/shader/gen_shaders.sh _bigendian
712
708modules/evas/engines/gl_common/shader/evas_gl_enum.x: modules/evas/engines/gl_common/shader/evas_gl_shaders.x 713modules/evas/engines/gl_common/shader/evas_gl_enum.x: modules/evas/engines/gl_common/shader/evas_gl_shaders.x
709 714
710# NOTE: order here should be equal with modes in file Evas_Eo.h 715# NOTE: order here should be equal with modes in file Evas_Eo.h
diff --git a/src/modules/evas/engines/gl_common/evas_gl_define.h b/src/modules/evas/engines/gl_common/evas_gl_define.h
index 822b9c9..2a14127 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_define.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_define.h
@@ -5,6 +5,9 @@
5#ifndef GL_TEXTURE_RECTANGLE_NV 5#ifndef GL_TEXTURE_RECTANGLE_NV
6# define GL_TEXTURE_RECTANGLE_NV 0x84F5 6# define GL_TEXTURE_RECTANGLE_NV 0x84F5
7#endif 7#endif
8#ifndef GL_ABGR
9# define GL_ABGR 0x8000
10#endif
8#ifndef GL_BGRA 11#ifndef GL_BGRA
9# define GL_BGRA 0x80E1 12# define GL_BGRA 0x80E1
10#endif 13#endif
diff --git a/src/modules/evas/engines/gl_common/evas_gl_shader.c b/src/modules/evas/engines/gl_common/evas_gl_shader.c
index ffba009..bbff64b 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_shader.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_shader.c
@@ -1,4 +1,9 @@
1#include "shader/evas_gl_shaders.x" 1#include "config.h"
2#ifdef WORDS_BIGENDIAN
3# include "shader/evas_gl_shaders_bigendian.x"
4#else
5# include "shader/evas_gl_shaders.x"
6#endif
2 7
3///////////////////////////////////////////// 8/////////////////////////////////////////////
4static void 9static void
diff --git a/src/modules/evas/engines/gl_common/evas_gl_texture.c b/src/modules/evas/engines/gl_common/evas_gl_texture.c
index f0eb722..b848c68 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_texture.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c
@@ -10,12 +10,20 @@ static const GLenum bgr_fmt = GL_BGRA;
10static const GLenum bgr_ifmt = GL_BGRA; 10static const GLenum bgr_ifmt = GL_BGRA;
11#else 11#else
12static const GLenum rgb_fmt = GL_RGBA; 12static const GLenum rgb_fmt = GL_RGBA;
13#ifdef WORDS_BIGENDIAN
14static const GLenum rgb_ifmt = GL_RGBA;
15#else
13static const GLenum rgb_ifmt = GL_RGB; 16static const GLenum rgb_ifmt = GL_RGB;
17#endif
14static const GLenum bgra_fmt = GL_BGRA; 18static const GLenum bgra_fmt = GL_BGRA;
15static const GLenum bgra_ifmt = GL_RGBA; 19static const GLenum bgra_ifmt = GL_RGBA;
16static const GLenum bgr_fmt = GL_BGRA; 20static const GLenum bgr_fmt = GL_BGRA;
21#ifdef WORDS_BIGENDIAN
22static const GLenum bgr_ifmt = GL_RGBA;
23#else
17static const GLenum bgr_ifmt = GL_RGB; 24static const GLenum bgr_ifmt = GL_RGB;
18#endif 25#endif
26#endif
19 27
20#ifdef GL_GLES 28#ifdef GL_GLES
21static const GLenum alpha_fmt = GL_ALPHA; 29static const GLenum alpha_fmt = GL_ALPHA;
diff --git a/src/modules/evas/engines/gl_common/shader/evas_gl_shaders_bigendian.x b/src/modules/evas/engines/gl_common/shader/evas_gl_shaders_bigendian.x
new file mode 100644
index 0000000..2dd95fb
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/evas_gl_shaders_bigendian.x
@@ -0,0 +1,9289 @@
1/* DO NOT MODIFY THIS FILE AS IT IS AUTO-GENERATED */
2/* IF IT IS CHANGED PLEASE COMMIT THE CHANGES */
3
4#include "../evas_gl_private.h"
5
6static const char rect_frag_glsl[] =
7 "#ifdef GL_ES\n"
8 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
9 "precision highp float;\n"
10 "#else\n"
11 "precision mediump float;\n"
12 "#endif\n"
13 "#endif\n"
14 "varying vec4 col;\n"
15 "void main()\n"
16 "{\n"
17 " vec4 c;\n"
18 " c = vec4(1, 1, 1, 1);\n"
19 " gl_FragColor =\n"
20 " c\n"
21 " * col\n"
22 " ;\n"
23 "}\n";
24Evas_GL_Program_Source shader_rect_frag_src =
25{
26 rect_frag_glsl,
27 NULL, 0
28};
29
30static const char rect_vert_glsl[] =
31 "#ifdef GL_ES\n"
32 "precision highp float;\n"
33 "#endif\n"
34 "attribute vec4 vertex;\n"
35 "uniform mat4 mvp;\n"
36 "attribute vec4 color;\n"
37 "varying vec4 col;\n"
38 "void main()\n"
39 "{\n"
40 " gl_Position = mvp * vertex;\n"
41 " col = color;\n"
42 "}\n";
43Evas_GL_Program_Source shader_rect_vert_src =
44{
45 rect_vert_glsl,
46 NULL, 0
47};
48
49static const char rect_mask_frag_glsl[] =
50 "#ifdef GL_ES\n"
51 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
52 "precision highp float;\n"
53 "#else\n"
54 "precision mediump float;\n"
55 "#endif\n"
56 "#endif\n"
57 "varying vec4 col;\n"
58 "uniform sampler2D texm;\n"
59 "varying vec2 tex_m;\n"
60 "void main()\n"
61 "{\n"
62 " vec4 c;\n"
63 " c = vec4(1, 1, 1, 1);\n"
64 " float ma;\n"
65 " ma = texture2D(texm, tex_m).a;\n"
66 " gl_FragColor =\n"
67 " c\n"
68 " * col\n"
69 " * ma\n"
70 " ;\n"
71 "}\n";
72Evas_GL_Program_Source shader_rect_mask_frag_src =
73{
74 rect_mask_frag_glsl,
75 NULL, 0
76};
77
78static const char rect_mask_vert_glsl[] =
79 "#ifdef GL_ES\n"
80 "precision highp float;\n"
81 "#endif\n"
82 "attribute vec4 vertex;\n"
83 "uniform mat4 mvp;\n"
84 "attribute vec4 color;\n"
85 "varying vec4 col;\n"
86 "attribute vec4 mask_coord;\n"
87 "varying vec2 tex_m;\n"
88 "void main()\n"
89 "{\n"
90 " gl_Position = mvp * vertex;\n"
91 " col = color;\n"
92 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
93 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
94 "}\n";
95Evas_GL_Program_Source shader_rect_mask_vert_src =
96{
97 rect_mask_vert_glsl,
98 NULL, 0
99};
100
101static const char rect_mask12_frag_glsl[] =
102 "#ifdef GL_ES\n"
103 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
104 "precision highp float;\n"
105 "#else\n"
106 "precision mediump float;\n"
107 "#endif\n"
108 "#endif\n"
109 "varying vec4 col;\n"
110 "uniform sampler2D texm;\n"
111 "varying vec2 tex_m;\n"
112 "varying float maskdiv_s;\n"
113 "varying vec2 masktex_s[2];\n"
114 "void main()\n"
115 "{\n"
116 " vec4 c;\n"
117 " c = vec4(1, 1, 1, 1);\n"
118 " float ma;\n"
119 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
120 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
121 " ma = (ma00 + ma01) / maskdiv_s;\n"
122 " gl_FragColor =\n"
123 " c\n"
124 " * col\n"
125 " * ma\n"
126 " ;\n"
127 "}\n";
128Evas_GL_Program_Source shader_rect_mask12_frag_src =
129{
130 rect_mask12_frag_glsl,
131 NULL, 0
132};
133
134static const char rect_mask12_vert_glsl[] =
135 "#ifdef GL_ES\n"
136 "precision highp float;\n"
137 "#endif\n"
138 "attribute vec4 vertex;\n"
139 "uniform mat4 mvp;\n"
140 "attribute vec4 color;\n"
141 "varying vec4 col;\n"
142 "attribute vec4 mask_coord;\n"
143 "varying vec2 tex_m;\n"
144 "attribute vec2 tex_masksample;\n"
145 "varying float maskdiv_s;\n"
146 "varying vec2 masktex_s[2];\n"
147 "void main()\n"
148 "{\n"
149 " gl_Position = mvp * vertex;\n"
150 " col = color;\n"
151 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
152 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
153 " maskdiv_s = 2.0;\n"
154 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
155 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
156 "}\n";
157Evas_GL_Program_Source shader_rect_mask12_vert_src =
158{
159 rect_mask12_vert_glsl,
160 NULL, 0
161};
162
163static const char rect_mask21_frag_glsl[] =
164 "#ifdef GL_ES\n"
165 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
166 "precision highp float;\n"
167 "#else\n"
168 "precision mediump float;\n"
169 "#endif\n"
170 "#endif\n"
171 "varying vec4 col;\n"
172 "uniform sampler2D texm;\n"
173 "varying vec2 tex_m;\n"
174 "varying float maskdiv_s;\n"
175 "varying vec2 masktex_s[2];\n"
176 "void main()\n"
177 "{\n"
178 " vec4 c;\n"
179 " c = vec4(1, 1, 1, 1);\n"
180 " float ma;\n"
181 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
182 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
183 " ma = (ma00 + ma01) / maskdiv_s;\n"
184 " gl_FragColor =\n"
185 " c\n"
186 " * col\n"
187 " * ma\n"
188 " ;\n"
189 "}\n";
190Evas_GL_Program_Source shader_rect_mask21_frag_src =
191{
192 rect_mask21_frag_glsl,
193 NULL, 0
194};
195
196static const char rect_mask21_vert_glsl[] =
197 "#ifdef GL_ES\n"
198 "precision highp float;\n"
199 "#endif\n"
200 "attribute vec4 vertex;\n"
201 "uniform mat4 mvp;\n"
202 "attribute vec4 color;\n"
203 "varying vec4 col;\n"
204 "attribute vec4 mask_coord;\n"
205 "varying vec2 tex_m;\n"
206 "attribute vec2 tex_masksample;\n"
207 "varying float maskdiv_s;\n"
208 "varying vec2 masktex_s[2];\n"
209 "void main()\n"
210 "{\n"
211 " gl_Position = mvp * vertex;\n"
212 " col = color;\n"
213 " masktex_s[0] = vec2(-tex_masksample.x, 0);\n"
214 " masktex_s[1] = vec2( tex_masksample.x, 0);\n"
215 " maskdiv_s = 2.0;\n"
216 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
217 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
218 "}\n";
219Evas_GL_Program_Source shader_rect_mask21_vert_src =
220{
221 rect_mask21_vert_glsl,
222 NULL, 0
223};
224
225static const char rect_mask22_frag_glsl[] =
226 "#ifdef GL_ES\n"
227 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
228 "precision highp float;\n"
229 "#else\n"
230 "precision mediump float;\n"
231 "#endif\n"
232 "#endif\n"
233 "varying vec4 col;\n"
234 "uniform sampler2D texm;\n"
235 "varying vec2 tex_m;\n"
236 "varying float maskdiv_s;\n"
237 "varying vec2 masktex_s[4];\n"
238 "void main()\n"
239 "{\n"
240 " vec4 c;\n"
241 " c = vec4(1, 1, 1, 1);\n"
242 " float ma;\n"
243 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
244 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
245 " float ma10 = texture2D(texm, tex_m + masktex_s[2]).a;\n"
246 " float ma11 = texture2D(texm, tex_m + masktex_s[3]).a;\n"
247 " ma = (ma00 + ma01 + ma10 + ma11) / maskdiv_s;\n"
248 " gl_FragColor =\n"
249 " c\n"
250 " * col\n"
251 " * ma\n"
252 " ;\n"
253 "}\n";
254Evas_GL_Program_Source shader_rect_mask22_frag_src =
255{
256 rect_mask22_frag_glsl,
257 NULL, 0
258};
259
260static const char rect_mask22_vert_glsl[] =
261 "#ifdef GL_ES\n"
262 "precision highp float;\n"
263 "#endif\n"
264 "attribute vec4 vertex;\n"
265 "uniform mat4 mvp;\n"
266 "attribute vec4 color;\n"
267 "varying vec4 col;\n"
268 "attribute vec4 mask_coord;\n"
269 "varying vec2 tex_m;\n"
270 "attribute vec2 tex_masksample;\n"
271 "varying float maskdiv_s;\n"
272 "varying vec2 masktex_s[4];\n"
273 "void main()\n"
274 "{\n"
275 " gl_Position = mvp * vertex;\n"
276 " col = color;\n"
277 " masktex_s[0] = vec2(-tex_masksample.x, -tex_masksample.y);\n"
278 " masktex_s[1] = vec2( tex_masksample.x, -tex_masksample.y);\n"
279 " masktex_s[2] = vec2( tex_masksample.x, tex_masksample.y);\n"
280 " masktex_s[3] = vec2(-tex_masksample.x, tex_masksample.y);\n"
281 " maskdiv_s = 4.0;\n"
282 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
283 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
284 "}\n";
285Evas_GL_Program_Source shader_rect_mask22_vert_src =
286{
287 rect_mask22_vert_glsl,
288 NULL, 0
289};
290
291static const char font_frag_glsl[] =
292 "#ifdef GL_ES\n"
293 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
294 "precision highp float;\n"
295 "#else\n"
296 "precision mediump float;\n"
297 "#endif\n"
298 "#endif\n"
299 "varying vec4 col;\n"
300 "uniform sampler2D tex;\n"
301 "varying vec2 tex_c;\n"
302 "void main()\n"
303 "{\n"
304 " vec4 c;\n"
305 " c = texture2D(tex, tex_c).aaaa;\n"
306 " gl_FragColor =\n"
307 " c\n"
308 " * col\n"
309 " ;\n"
310 "}\n";
311Evas_GL_Program_Source shader_font_frag_src =
312{
313 font_frag_glsl,
314 NULL, 0
315};
316
317static const char font_vert_glsl[] =
318 "#ifdef GL_ES\n"
319 "precision highp float;\n"
320 "#endif\n"
321 "attribute vec4 vertex;\n"
322 "uniform mat4 mvp;\n"
323 "attribute vec4 color;\n"
324 "varying vec4 col;\n"
325 "attribute vec2 tex_coord;\n"
326 "varying vec2 tex_c;\n"
327 "void main()\n"
328 "{\n"
329 " gl_Position = mvp * vertex;\n"
330 " col = color;\n"
331 " tex_c = tex_coord;\n"
332 "}\n";
333Evas_GL_Program_Source shader_font_vert_src =
334{
335 font_vert_glsl,
336 NULL, 0
337};
338
339static const char font_mask_frag_glsl[] =
340 "#ifdef GL_ES\n"
341 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
342 "precision highp float;\n"
343 "#else\n"
344 "precision mediump float;\n"
345 "#endif\n"
346 "#endif\n"
347 "varying vec4 col;\n"
348 "uniform sampler2D tex;\n"
349 "varying vec2 tex_c;\n"
350 "uniform sampler2D texm;\n"
351 "varying vec2 tex_m;\n"
352 "void main()\n"
353 "{\n"
354 " vec4 c;\n"
355 " c = texture2D(tex, tex_c).aaaa;\n"
356 " float ma;\n"
357 " ma = texture2D(texm, tex_m).a;\n"
358 " gl_FragColor =\n"
359 " c\n"
360 " * col\n"
361 " * ma\n"
362 " ;\n"
363 "}\n";
364Evas_GL_Program_Source shader_font_mask_frag_src =
365{
366 font_mask_frag_glsl,
367 NULL, 0
368};
369
370static const char font_mask_vert_glsl[] =
371 "#ifdef GL_ES\n"
372 "precision highp float;\n"
373 "#endif\n"
374 "attribute vec4 vertex;\n"
375 "uniform mat4 mvp;\n"
376 "attribute vec4 color;\n"
377 "varying vec4 col;\n"
378 "attribute vec2 tex_coord;\n"
379 "varying vec2 tex_c;\n"
380 "attribute vec4 mask_coord;\n"
381 "varying vec2 tex_m;\n"
382 "void main()\n"
383 "{\n"
384 " gl_Position = mvp * vertex;\n"
385 " col = color;\n"
386 " tex_c = tex_coord;\n"
387 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
388 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
389 "}\n";
390Evas_GL_Program_Source shader_font_mask_vert_src =
391{
392 font_mask_vert_glsl,
393 NULL, 0
394};
395
396static const char font_mask12_frag_glsl[] =
397 "#ifdef GL_ES\n"
398 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
399 "precision highp float;\n"
400 "#else\n"
401 "precision mediump float;\n"
402 "#endif\n"
403 "#endif\n"
404 "varying vec4 col;\n"
405 "uniform sampler2D tex;\n"
406 "varying vec2 tex_c;\n"
407 "uniform sampler2D texm;\n"
408 "varying vec2 tex_m;\n"
409 "varying float maskdiv_s;\n"
410 "varying vec2 masktex_s[2];\n"
411 "void main()\n"
412 "{\n"
413 " vec4 c;\n"
414 " c = texture2D(tex, tex_c).aaaa;\n"
415 " float ma;\n"
416 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
417 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
418 " ma = (ma00 + ma01) / maskdiv_s;\n"
419 " gl_FragColor =\n"
420 " c\n"
421 " * col\n"
422 " * ma\n"
423 " ;\n"
424 "}\n";
425Evas_GL_Program_Source shader_font_mask12_frag_src =
426{
427 font_mask12_frag_glsl,
428 NULL, 0
429};
430
431static const char font_mask12_vert_glsl[] =
432 "#ifdef GL_ES\n"
433 "precision highp float;\n"
434 "#endif\n"
435 "attribute vec4 vertex;\n"
436 "uniform mat4 mvp;\n"
437 "attribute vec4 color;\n"
438 "varying vec4 col;\n"
439 "attribute vec2 tex_coord;\n"
440 "varying vec2 tex_c;\n"
441 "attribute vec4 mask_coord;\n"
442 "varying vec2 tex_m;\n"
443 "attribute vec2 tex_masksample;\n"
444 "varying float maskdiv_s;\n"
445 "varying vec2 masktex_s[2];\n"
446 "void main()\n"
447 "{\n"
448 " gl_Position = mvp * vertex;\n"
449 " col = color;\n"
450 " tex_c = tex_coord;\n"
451 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
452 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
453 " maskdiv_s = 2.0;\n"
454 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
455 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
456 "}\n";
457Evas_GL_Program_Source shader_font_mask12_vert_src =
458{
459 font_mask12_vert_glsl,
460 NULL, 0
461};
462
463static const char font_mask21_frag_glsl[] =
464 "#ifdef GL_ES\n"
465 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
466 "precision highp float;\n"
467 "#else\n"
468 "precision mediump float;\n"
469 "#endif\n"
470 "#endif\n"
471 "varying vec4 col;\n"
472 "uniform sampler2D tex;\n"
473 "varying vec2 tex_c;\n"
474 "uniform sampler2D texm;\n"
475 "varying vec2 tex_m;\n"
476 "varying float maskdiv_s;\n"
477 "varying vec2 masktex_s[2];\n"
478 "void main()\n"
479 "{\n"
480 " vec4 c;\n"
481 " c = texture2D(tex, tex_c).aaaa;\n"
482 " float ma;\n"
483 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
484 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
485 " ma = (ma00 + ma01) / maskdiv_s;\n"
486 " gl_FragColor =\n"
487 " c\n"
488 " * col\n"
489 " * ma\n"
490 " ;\n"
491 "}\n";
492Evas_GL_Program_Source shader_font_mask21_frag_src =
493{
494 font_mask21_frag_glsl,
495 NULL, 0
496};
497
498static const char font_mask21_vert_glsl[] =
499 "#ifdef GL_ES\n"
500 "precision highp float;\n"
501 "#endif\n"
502 "attribute vec4 vertex;\n"
503 "uniform mat4 mvp;\n"
504 "attribute vec4 color;\n"
505 "varying vec4 col;\n"
506 "attribute vec2 tex_coord;\n"
507 "varying vec2 tex_c;\n"
508 "attribute vec4 mask_coord;\n"
509 "varying vec2 tex_m;\n"
510 "attribute vec2 tex_masksample;\n"
511 "varying float maskdiv_s;\n"
512 "varying vec2 masktex_s[2];\n"
513 "void main()\n"
514 "{\n"
515 " gl_Position = mvp * vertex;\n"
516 " col = color;\n"
517 " tex_c = tex_coord;\n"
518 " masktex_s[0] = vec2(-tex_masksample.x, 0);\n"
519 " masktex_s[1] = vec2( tex_masksample.x, 0);\n"
520 " maskdiv_s = 2.0;\n"
521 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
522 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
523 "}\n";
524Evas_GL_Program_Source shader_font_mask21_vert_src =
525{
526 font_mask21_vert_glsl,
527 NULL, 0
528};
529
530static const char font_mask22_frag_glsl[] =
531 "#ifdef GL_ES\n"
532 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
533 "precision highp float;\n"
534 "#else\n"
535 "precision mediump float;\n"
536 "#endif\n"
537 "#endif\n"
538 "varying vec4 col;\n"
539 "uniform sampler2D tex;\n"
540 "varying vec2 tex_c;\n"
541 "uniform sampler2D texm;\n"
542 "varying vec2 tex_m;\n"
543 "varying float maskdiv_s;\n"
544 "varying vec2 masktex_s[4];\n"
545 "void main()\n"
546 "{\n"
547 " vec4 c;\n"
548 " c = texture2D(tex, tex_c).aaaa;\n"
549 " float ma;\n"
550 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
551 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
552 " float ma10 = texture2D(texm, tex_m + masktex_s[2]).a;\n"
553 " float ma11 = texture2D(texm, tex_m + masktex_s[3]).a;\n"
554 " ma = (ma00 + ma01 + ma10 + ma11) / maskdiv_s;\n"
555 " gl_FragColor =\n"
556 " c\n"
557 " * col\n"
558 " * ma\n"
559 " ;\n"
560 "}\n";
561Evas_GL_Program_Source shader_font_mask22_frag_src =
562{
563 font_mask22_frag_glsl,
564 NULL, 0
565};
566
567static const char font_mask22_vert_glsl[] =
568 "#ifdef GL_ES\n"
569 "precision highp float;\n"
570 "#endif\n"
571 "attribute vec4 vertex;\n"
572 "uniform mat4 mvp;\n"
573 "attribute vec4 color;\n"
574 "varying vec4 col;\n"
575 "attribute vec2 tex_coord;\n"
576 "varying vec2 tex_c;\n"
577 "attribute vec4 mask_coord;\n"
578 "varying vec2 tex_m;\n"
579 "attribute vec2 tex_masksample;\n"
580 "varying float maskdiv_s;\n"
581 "varying vec2 masktex_s[4];\n"
582 "void main()\n"
583 "{\n"
584 " gl_Position = mvp * vertex;\n"
585 " col = color;\n"
586 " tex_c = tex_coord;\n"
587 " masktex_s[0] = vec2(-tex_masksample.x, -tex_masksample.y);\n"
588 " masktex_s[1] = vec2( tex_masksample.x, -tex_masksample.y);\n"
589 " masktex_s[2] = vec2( tex_masksample.x, tex_masksample.y);\n"
590 " masktex_s[3] = vec2(-tex_masksample.x, tex_masksample.y);\n"
591 " maskdiv_s = 4.0;\n"
592 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
593 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
594 "}\n";
595Evas_GL_Program_Source shader_font_mask22_vert_src =
596{
597 font_mask22_vert_glsl,
598 NULL, 0
599};
600
601static const char img_frag_glsl[] =
602 "#ifdef GL_ES\n"
603 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
604 "precision highp float;\n"
605 "#else\n"
606 "precision mediump float;\n"
607 "#endif\n"
608 "#endif\n"
609 "varying vec4 col;\n"
610 "uniform sampler2D tex;\n"
611 "varying vec2 tex_c;\n"
612 "void main()\n"
613 "{\n"
614 " vec4 c;\n"
615 " c = texture2D(tex, tex_c).gbar;\n"
616 " gl_FragColor =\n"
617 " c\n"
618 " * col\n"
619 " ;\n"
620 "}\n";
621Evas_GL_Program_Source shader_img_frag_src =
622{
623 img_frag_glsl,
624 NULL, 0
625};
626
627static const char img_vert_glsl[] =
628 "#ifdef GL_ES\n"
629 "precision highp float;\n"
630 "#endif\n"
631 "attribute vec4 vertex;\n"
632 "uniform mat4 mvp;\n"
633 "attribute vec4 color;\n"
634 "varying vec4 col;\n"
635 "attribute vec2 tex_coord;\n"
636 "varying vec2 tex_c;\n"
637 "void main()\n"
638 "{\n"
639 " gl_Position = mvp * vertex;\n"
640 " col = color;\n"
641 " tex_c = tex_coord;\n"
642 "}\n";
643Evas_GL_Program_Source shader_img_vert_src =
644{
645 img_vert_glsl,
646 NULL, 0
647};
648
649static const char img_bgra_frag_glsl[] =
650 "#ifdef GL_ES\n"
651 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
652 "precision highp float;\n"
653 "#else\n"
654 "precision mediump float;\n"
655 "#endif\n"
656 "#endif\n"
657 "varying vec4 col;\n"
658 "uniform sampler2D tex;\n"
659 "varying vec2 tex_c;\n"
660 "void main()\n"
661 "{\n"
662 " vec4 c;\n"
663 " c = texture2D(tex, tex_c).grab;\n"
664 " gl_FragColor =\n"
665 " c\n"
666 " * col\n"
667 " ;\n"
668 "}\n";
669Evas_GL_Program_Source shader_img_bgra_frag_src =
670{
671 img_bgra_frag_glsl,
672 NULL, 0
673};
674
675static const char img_bgra_vert_glsl[] =
676 "#ifdef GL_ES\n"
677 "precision highp float;\n"
678 "#endif\n"
679 "attribute vec4 vertex;\n"
680 "uniform mat4 mvp;\n"
681 "attribute vec4 color;\n"
682 "varying vec4 col;\n"
683 "attribute vec2 tex_coord;\n"
684 "varying vec2 tex_c;\n"
685 "void main()\n"
686 "{\n"
687 " gl_Position = mvp * vertex;\n"
688 " col = color;\n"
689 " tex_c = tex_coord;\n"
690 "}\n";
691Evas_GL_Program_Source shader_img_bgra_vert_src =
692{
693 img_bgra_vert_glsl,
694 NULL, 0
695};
696
697static const char img_12_frag_glsl[] =
698 "#ifdef GL_ES\n"
699 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
700 "precision highp float;\n"
701 "#else\n"
702 "precision mediump float;\n"
703 "#endif\n"
704 "#endif\n"
705 "varying vec4 col;\n"
706 "uniform sampler2D tex;\n"
707 "varying vec2 tex_c;\n"
708 "varying vec4 div_s;\n"
709 "varying vec2 tex_s[2];\n"
710 "void main()\n"
711 "{\n"
712 " vec4 c;\n"
713 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).gbar;\n"
714 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).gbar;\n"
715 " c = (col00 + col01) / div_s;\n"
716 " gl_FragColor =\n"
717 " c\n"
718 " * col\n"
719 " ;\n"
720 "}\n";
721Evas_GL_Program_Source shader_img_12_frag_src =
722{
723 img_12_frag_glsl,
724 NULL, 0
725};
726
727static const char img_12_vert_glsl[] =
728 "#ifdef GL_ES\n"
729 "precision highp float;\n"
730 "#endif\n"
731 "attribute vec4 vertex;\n"
732 "uniform mat4 mvp;\n"
733 "attribute vec4 color;\n"
734 "varying vec4 col;\n"
735 "attribute vec2 tex_coord;\n"
736 "varying vec2 tex_c;\n"
737 "attribute vec2 tex_sample;\n"
738 "varying vec4 div_s;\n"
739 "varying vec2 tex_s[2];\n"
740 "void main()\n"
741 "{\n"
742 " gl_Position = mvp * vertex;\n"
743 " col = color;\n"
744 " tex_c = tex_coord;\n"
745 " tex_s[0] = vec2(0, -tex_sample.y);\n"
746 " tex_s[1] = vec2(0, tex_sample.y);\n"
747 " div_s = vec4(2, 2, 2, 2);\n"
748 "}\n";
749Evas_GL_Program_Source shader_img_12_vert_src =
750{
751 img_12_vert_glsl,
752 NULL, 0
753};
754
755static const char img_21_frag_glsl[] =
756 "#ifdef GL_ES\n"
757 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
758 "precision highp float;\n"
759 "#else\n"
760 "precision mediump float;\n"
761 "#endif\n"
762 "#endif\n"
763 "varying vec4 col;\n"
764 "uniform sampler2D tex;\n"
765 "varying vec2 tex_c;\n"
766 "varying vec4 div_s;\n"
767 "varying vec2 tex_s[2];\n"
768 "void main()\n"
769 "{\n"
770 " vec4 c;\n"
771 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).gbar;\n"
772 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).gbar;\n"
773 " c = (col00 + col01) / div_s;\n"
774 " gl_FragColor =\n"
775 " c\n"
776 " * col\n"
777 " ;\n"
778 "}\n";
779Evas_GL_Program_Source shader_img_21_frag_src =
780{
781 img_21_frag_glsl,
782 NULL, 0
783};
784
785static const char img_21_vert_glsl[] =
786 "#ifdef GL_ES\n"
787 "precision highp float;\n"
788 "#endif\n"
789 "attribute vec4 vertex;\n"
790 "uniform mat4 mvp;\n"
791 "attribute vec4 color;\n"
792 "varying vec4 col;\n"
793 "attribute vec2 tex_coord;\n"
794 "varying vec2 tex_c;\n"
795 "attribute vec2 tex_sample;\n"
796 "varying vec4 div_s;\n"
797 "varying vec2 tex_s[2];\n"
798 "void main()\n"
799 "{\n"
800 " gl_Position = mvp * vertex;\n"
801 " col = color;\n"
802 " tex_c = tex_coord;\n"
803 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
804 " tex_s[1] = vec2( tex_sample.x, 0);\n"
805 " div_s = vec4(2, 2, 2, 2);\n"
806 "}\n";
807Evas_GL_Program_Source shader_img_21_vert_src =
808{
809 img_21_vert_glsl,
810 NULL, 0
811};
812
813static const char img_22_frag_glsl[] =
814 "#ifdef GL_ES\n"
815 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
816 "precision highp float;\n"
817 "#else\n"
818 "precision mediump float;\n"
819 "#endif\n"
820 "#endif\n"
821 "varying vec4 col;\n"
822 "uniform sampler2D tex;\n"
823 "varying vec2 tex_c;\n"
824 "varying vec4 div_s;\n"
825 "varying vec2 tex_s[4];\n"
826 "void main()\n"
827 "{\n"
828 " vec4 c;\n"
829 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).gbar;\n"
830 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).gbar;\n"
831 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).gbar;\n"
832 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).gbar;\n"
833 " c = (col00 + col01 + col10 + col11) / div_s;\n"
834 " gl_FragColor =\n"
835 " c\n"
836 " * col\n"
837 " ;\n"
838 "}\n";
839Evas_GL_Program_Source shader_img_22_frag_src =
840{
841 img_22_frag_glsl,
842 NULL, 0
843};
844
845static const char img_22_vert_glsl[] =
846 "#ifdef GL_ES\n"
847 "precision highp float;\n"
848 "#endif\n"
849 "attribute vec4 vertex;\n"
850 "uniform mat4 mvp;\n"
851 "attribute vec4 color;\n"
852 "varying vec4 col;\n"
853 "attribute vec2 tex_coord;\n"
854 "varying vec2 tex_c;\n"
855 "attribute vec2 tex_sample;\n"
856 "varying vec4 div_s;\n"
857 "varying vec2 tex_s[4];\n"
858 "void main()\n"
859 "{\n"
860 " gl_Position = mvp * vertex;\n"
861 " col = color;\n"
862 " tex_c = tex_coord;\n"
863 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
864 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
865 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
866 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
867 " div_s = vec4(4, 4, 4, 4);\n"
868 "}\n";
869Evas_GL_Program_Source shader_img_22_vert_src =
870{
871 img_22_vert_glsl,
872 NULL, 0
873};
874
875static const char img_12_bgra_frag_glsl[] =
876 "#ifdef GL_ES\n"
877 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
878 "precision highp float;\n"
879 "#else\n"
880 "precision mediump float;\n"
881 "#endif\n"
882 "#endif\n"
883 "varying vec4 col;\n"
884 "uniform sampler2D tex;\n"
885 "varying vec2 tex_c;\n"
886 "varying vec4 div_s;\n"
887 "varying vec2 tex_s[2];\n"
888 "void main()\n"
889 "{\n"
890 " vec4 c;\n"
891 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).grab;\n"
892 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).grab;\n"
893 " c = (col00 + col01) / div_s;\n"
894 " gl_FragColor =\n"
895 " c\n"
896 " * col\n"
897 " ;\n"
898 "}\n";
899Evas_GL_Program_Source shader_img_12_bgra_frag_src =
900{
901 img_12_bgra_frag_glsl,
902 NULL, 0
903};
904
905static const char img_12_bgra_vert_glsl[] =
906 "#ifdef GL_ES\n"
907 "precision highp float;\n"
908 "#endif\n"
909 "attribute vec4 vertex;\n"
910 "uniform mat4 mvp;\n"
911 "attribute vec4 color;\n"
912 "varying vec4 col;\n"
913 "attribute vec2 tex_coord;\n"
914 "varying vec2 tex_c;\n"
915 "attribute vec2 tex_sample;\n"
916 "varying vec4 div_s;\n"
917 "varying vec2 tex_s[2];\n"
918 "void main()\n"
919 "{\n"
920 " gl_Position = mvp * vertex;\n"
921 " col = color;\n"
922 " tex_c = tex_coord;\n"
923 " tex_s[0] = vec2(0, -tex_sample.y);\n"
924 " tex_s[1] = vec2(0, tex_sample.y);\n"
925 " div_s = vec4(2, 2, 2, 2);\n"
926 "}\n";
927Evas_GL_Program_Source shader_img_12_bgra_vert_src =
928{
929 img_12_bgra_vert_glsl,
930 NULL, 0
931};
932
933static const char img_21_bgra_frag_glsl[] =
934 "#ifdef GL_ES\n"
935 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
936 "precision highp float;\n"
937 "#else\n"
938 "precision mediump float;\n"
939 "#endif\n"
940 "#endif\n"
941 "varying vec4 col;\n"
942 "uniform sampler2D tex;\n"
943 "varying vec2 tex_c;\n"
944 "varying vec4 div_s;\n"
945 "varying vec2 tex_s[2];\n"
946 "void main()\n"
947 "{\n"
948 " vec4 c;\n"
949 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).grab;\n"
950 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).grab;\n"
951 " c = (col00 + col01) / div_s;\n"
952 " gl_FragColor =\n"
953 " c\n"
954 " * col\n"
955 " ;\n"
956 "}\n";
957Evas_GL_Program_Source shader_img_21_bgra_frag_src =
958{
959 img_21_bgra_frag_glsl,
960 NULL, 0
961};
962
963static const char img_21_bgra_vert_glsl[] =
964 "#ifdef GL_ES\n"
965 "precision highp float;\n"
966 "#endif\n"
967 "attribute vec4 vertex;\n"
968 "uniform mat4 mvp;\n"
969 "attribute vec4 color;\n"
970 "varying vec4 col;\n"
971 "attribute vec2 tex_coord;\n"
972 "varying vec2 tex_c;\n"
973 "attribute vec2 tex_sample;\n"
974 "varying vec4 div_s;\n"
975 "varying vec2 tex_s[2];\n"
976 "void main()\n"
977 "{\n"
978 " gl_Position = mvp * vertex;\n"
979 " col = color;\n"
980 " tex_c = tex_coord;\n"
981 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
982 " tex_s[1] = vec2( tex_sample.x, 0);\n"
983 " div_s = vec4(2, 2, 2, 2);\n"
984 "}\n";
985Evas_GL_Program_Source shader_img_21_bgra_vert_src =
986{
987 img_21_bgra_vert_glsl,
988 NULL, 0
989};
990
991static const char img_22_bgra_frag_glsl[] =
992 "#ifdef GL_ES\n"
993 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
994 "precision highp float;\n"
995 "#else\n"
996 "precision mediump float;\n"
997 "#endif\n"
998 "#endif\n"
999 "varying vec4 col;\n"
1000 "uniform sampler2D tex;\n"
1001 "varying vec2 tex_c;\n"
1002 "varying vec4 div_s;\n"
1003 "varying vec2 tex_s[4];\n"
1004 "void main()\n"
1005 "{\n"
1006 " vec4 c;\n"
1007 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).grab;\n"
1008 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).grab;\n"
1009 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).grab;\n"
1010 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).grab;\n"
1011 " c = (col00 + col01 + col10 + col11) / div_s;\n"
1012 " gl_FragColor =\n"
1013 " c\n"
1014 " * col\n"
1015 " ;\n"
1016 "}\n";
1017Evas_GL_Program_Source shader_img_22_bgra_frag_src =
1018{
1019 img_22_bgra_frag_glsl,
1020 NULL, 0
1021};
1022
1023static const char img_22_bgra_vert_glsl[] =
1024 "#ifdef GL_ES\n"
1025 "precision highp float;\n"
1026 "#endif\n"
1027 "attribute vec4 vertex;\n"
1028 "uniform mat4 mvp;\n"
1029 "attribute vec4 color;\n"
1030 "varying vec4 col;\n"
1031 "attribute vec2 tex_coord;\n"
1032 "varying vec2 tex_c;\n"
1033 "attribute vec2 tex_sample;\n"
1034 "varying vec4 div_s;\n"
1035 "varying vec2 tex_s[4];\n"
1036 "void main()\n"
1037 "{\n"
1038 " gl_Position = mvp * vertex;\n"
1039 " col = color;\n"
1040 " tex_c = tex_coord;\n"
1041 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
1042 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
1043 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
1044 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
1045 " div_s = vec4(4, 4, 4, 4);\n"
1046 "}\n";
1047Evas_GL_Program_Source shader_img_22_bgra_vert_src =
1048{
1049 img_22_bgra_vert_glsl,
1050 NULL, 0
1051};
1052
1053static const char img_mask_frag_glsl[] =
1054 "#ifdef GL_ES\n"
1055 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1056 "precision highp float;\n"
1057 "#else\n"
1058 "precision mediump float;\n"
1059 "#endif\n"
1060 "#endif\n"
1061 "varying vec4 col;\n"
1062 "uniform sampler2D tex;\n"
1063 "varying vec2 tex_c;\n"
1064 "uniform sampler2D texm;\n"
1065 "varying vec2 tex_m;\n"
1066 "void main()\n"
1067 "{\n"
1068 " vec4 c;\n"
1069 " c = texture2D(tex, tex_c).gbar;\n"
1070 " float ma;\n"
1071 " ma = texture2D(texm, tex_m).a;\n"
1072 " gl_FragColor =\n"
1073 " c\n"
1074 " * col\n"
1075 " * ma\n"
1076 " ;\n"
1077 "}\n";
1078Evas_GL_Program_Source shader_img_mask_frag_src =
1079{
1080 img_mask_frag_glsl,
1081 NULL, 0
1082};
1083
1084static const char img_mask_vert_glsl[] =
1085 "#ifdef GL_ES\n"
1086 "precision highp float;\n"
1087 "#endif\n"
1088 "attribute vec4 vertex;\n"
1089 "uniform mat4 mvp;\n"
1090 "attribute vec4 color;\n"
1091 "varying vec4 col;\n"
1092 "attribute vec2 tex_coord;\n"
1093 "varying vec2 tex_c;\n"
1094 "attribute vec4 mask_coord;\n"
1095 "varying vec2 tex_m;\n"
1096 "void main()\n"
1097 "{\n"
1098 " gl_Position = mvp * vertex;\n"
1099 " col = color;\n"
1100 " tex_c = tex_coord;\n"
1101 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
1102 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
1103 "}\n";
1104Evas_GL_Program_Source shader_img_mask_vert_src =
1105{
1106 img_mask_vert_glsl,
1107 NULL, 0
1108};
1109
1110static const char img_bgra_mask_frag_glsl[] =
1111 "#ifdef GL_ES\n"
1112 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1113 "precision highp float;\n"
1114 "#else\n"
1115 "precision mediump float;\n"
1116 "#endif\n"
1117 "#endif\n"
1118 "varying vec4 col;\n"
1119 "uniform sampler2D tex;\n"
1120 "varying vec2 tex_c;\n"
1121 "uniform sampler2D texm;\n"
1122 "varying vec2 tex_m;\n"
1123 "void main()\n"
1124 "{\n"
1125 " vec4 c;\n"
1126 " c = texture2D(tex, tex_c).grab;\n"
1127 " float ma;\n"
1128 " ma = texture2D(texm, tex_m).a;\n"
1129 " gl_FragColor =\n"
1130 " c\n"
1131 " * col\n"
1132 " * ma\n"
1133 " ;\n"
1134 "}\n";
1135Evas_GL_Program_Source shader_img_bgra_mask_frag_src =
1136{
1137 img_bgra_mask_frag_glsl,
1138 NULL, 0
1139};
1140
1141static const char img_bgra_mask_vert_glsl[] =
1142 "#ifdef GL_ES\n"
1143 "precision highp float;\n"
1144 "#endif\n"
1145 "attribute vec4 vertex;\n"
1146 "uniform mat4 mvp;\n"
1147 "attribute vec4 color;\n"
1148 "varying vec4 col;\n"
1149 "attribute vec2 tex_coord;\n"
1150 "varying vec2 tex_c;\n"
1151 "attribute vec4 mask_coord;\n"
1152 "varying vec2 tex_m;\n"
1153 "void main()\n"
1154 "{\n"
1155 " gl_Position = mvp * vertex;\n"
1156 " col = color;\n"
1157 " tex_c = tex_coord;\n"
1158 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
1159 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
1160 "}\n";
1161Evas_GL_Program_Source shader_img_bgra_mask_vert_src =
1162{
1163 img_bgra_mask_vert_glsl,
1164 NULL, 0
1165};
1166
1167static const char img_12_mask_frag_glsl[] =
1168 "#ifdef GL_ES\n"
1169 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1170 "precision highp float;\n"
1171 "#else\n"
1172 "precision mediump float;\n"
1173 "#endif\n"
1174 "#endif\n"
1175 "varying vec4 col;\n"
1176 "uniform sampler2D tex;\n"
1177 "varying vec2 tex_c;\n"
1178 "varying vec4 div_s;\n"
1179 "varying vec2 tex_s[2];\n"
1180 "uniform sampler2D texm;\n"
1181 "varying vec2 tex_m;\n"
1182 "void main()\n"
1183 "{\n"
1184 " vec4 c;\n"
1185 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).gbar;\n"
1186 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).gbar;\n"
1187 " c = (col00 + col01) / div_s;\n"
1188 " float ma;\n"
1189 " ma = texture2D(texm, tex_m).a;\n"
1190 " gl_FragColor =\n"
1191 " c\n"
1192 " * col\n"
1193 " * ma\n"
1194 " ;\n"
1195 "}\n";
1196Evas_GL_Program_Source shader_img_12_mask_frag_src =
1197{
1198 img_12_mask_frag_glsl,
1199 NULL, 0
1200};
1201
1202static const char img_12_mask_vert_glsl[] =
1203 "#ifdef GL_ES\n"
1204 "precision highp float;\n"
1205 "#endif\n"
1206 "attribute vec4 vertex;\n"
1207 "uniform mat4 mvp;\n"
1208 "attribute vec4 color;\n"
1209 "varying vec4 col;\n"
1210 "attribute vec2 tex_coord;\n"
1211 "varying vec2 tex_c;\n"
1212 "attribute vec2 tex_sample;\n"
1213 "varying vec4 div_s;\n"
1214 "varying vec2 tex_s[2];\n"
1215 "attribute vec4 mask_coord;\n"
1216 "varying vec2 tex_m;\n"
1217 "void main()\n"
1218 "{\n"
1219 " gl_Position = mvp * vertex;\n"
1220 " col = color;\n"
1221 " tex_c = tex_coord;\n"
1222 " tex_s[0] = vec2(0, -tex_sample.y);\n"
1223 " tex_s[1] = vec2(0, tex_sample.y);\n"
1224 " div_s = vec4(2, 2, 2, 2);\n"
1225 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
1226 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
1227 "}\n";
1228Evas_GL_Program_Source shader_img_12_mask_vert_src =
1229{
1230 img_12_mask_vert_glsl,
1231 NULL, 0
1232};
1233
1234static const char img_21_mask_frag_glsl[] =
1235 "#ifdef GL_ES\n"
1236 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1237 "precision highp float;\n"
1238 "#else\n"
1239 "precision mediump float;\n"
1240 "#endif\n"
1241 "#endif\n"
1242 "varying vec4 col;\n"
1243 "uniform sampler2D tex;\n"
1244 "varying vec2 tex_c;\n"
1245 "varying vec4 div_s;\n"
1246 "varying vec2 tex_s[2];\n"
1247 "uniform sampler2D texm;\n"
1248 "varying vec2 tex_m;\n"
1249 "void main()\n"
1250 "{\n"
1251 " vec4 c;\n"
1252 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).gbar;\n"
1253 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).gbar;\n"
1254 " c = (col00 + col01) / div_s;\n"
1255 " float ma;\n"
1256 " ma = texture2D(texm, tex_m).a;\n"
1257 " gl_FragColor =\n"
1258 " c\n"
1259 " * col\n"
1260 " * ma\n"
1261 " ;\n"
1262 "}\n";
1263Evas_GL_Program_Source shader_img_21_mask_frag_src =
1264{
1265 img_21_mask_frag_glsl,
1266 NULL, 0
1267};
1268
1269static const char img_21_mask_vert_glsl[] =
1270 "#ifdef GL_ES\n"
1271 "precision highp float;\n"
1272 "#endif\n"
1273 "attribute vec4 vertex;\n"
1274 "uniform mat4 mvp;\n"
1275 "attribute vec4 color;\n"
1276 "varying vec4 col;\n"
1277 "attribute vec2 tex_coord;\n"
1278 "varying vec2 tex_c;\n"
1279 "attribute vec2 tex_sample;\n"
1280 "varying vec4 div_s;\n"
1281 "varying vec2 tex_s[2];\n"
1282 "attribute vec4 mask_coord;\n"
1283 "varying vec2 tex_m;\n"
1284 "void main()\n"
1285 "{\n"
1286 " gl_Position = mvp * vertex;\n"
1287 " col = color;\n"
1288 " tex_c = tex_coord;\n"
1289 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
1290 " tex_s[1] = vec2( tex_sample.x, 0);\n"
1291 " div_s = vec4(2, 2, 2, 2);\n"
1292 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
1293 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
1294 "}\n";
1295Evas_GL_Program_Source shader_img_21_mask_vert_src =
1296{
1297 img_21_mask_vert_glsl,
1298 NULL, 0
1299};
1300
1301static const char img_22_mask_frag_glsl[] =
1302 "#ifdef GL_ES\n"
1303 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1304 "precision highp float;\n"
1305 "#else\n"
1306 "precision mediump float;\n"
1307 "#endif\n"
1308 "#endif\n"
1309 "varying vec4 col;\n"
1310 "uniform sampler2D tex;\n"
1311 "varying vec2 tex_c;\n"
1312 "varying vec4 div_s;\n"
1313 "varying vec2 tex_s[4];\n"
1314 "uniform sampler2D texm;\n"
1315 "varying vec2 tex_m;\n"
1316 "void main()\n"
1317 "{\n"
1318 " vec4 c;\n"
1319 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).gbar;\n"
1320 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).gbar;\n"
1321 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).gbar;\n"
1322 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).gbar;\n"
1323 " c = (col00 + col01 + col10 + col11) / div_s;\n"
1324 " float ma;\n"
1325 " ma = texture2D(texm, tex_m).a;\n"
1326 " gl_FragColor =\n"
1327 " c\n"
1328 " * col\n"
1329 " * ma\n"
1330 " ;\n"
1331 "}\n";
1332Evas_GL_Program_Source shader_img_22_mask_frag_src =
1333{
1334 img_22_mask_frag_glsl,
1335 NULL, 0
1336};
1337
1338static const char img_22_mask_vert_glsl[] =
1339 "#ifdef GL_ES\n"
1340 "precision highp float;\n"
1341 "#endif\n"
1342 "attribute vec4 vertex;\n"
1343 "uniform mat4 mvp;\n"
1344 "attribute vec4 color;\n"
1345 "varying vec4 col;\n"
1346 "attribute vec2 tex_coord;\n"
1347 "varying vec2 tex_c;\n"
1348 "attribute vec2 tex_sample;\n"
1349 "varying vec4 div_s;\n"
1350 "varying vec2 tex_s[4];\n"
1351 "attribute vec4 mask_coord;\n"
1352 "varying vec2 tex_m;\n"
1353 "void main()\n"
1354 "{\n"
1355 " gl_Position = mvp * vertex;\n"
1356 " col = color;\n"
1357 " tex_c = tex_coord;\n"
1358 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
1359 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
1360 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
1361 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
1362 " div_s = vec4(4, 4, 4, 4);\n"
1363 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
1364 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
1365 "}\n";
1366Evas_GL_Program_Source shader_img_22_mask_vert_src =
1367{
1368 img_22_mask_vert_glsl,
1369 NULL, 0
1370};
1371
1372static const char img_12_bgra_mask_frag_glsl[] =
1373 "#ifdef GL_ES\n"
1374 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1375 "precision highp float;\n"
1376 "#else\n"
1377 "precision mediump float;\n"
1378 "#endif\n"
1379 "#endif\n"
1380 "varying vec4 col;\n"
1381 "uniform sampler2D tex;\n"
1382 "varying vec2 tex_c;\n"
1383 "varying vec4 div_s;\n"
1384 "varying vec2 tex_s[2];\n"
1385 "uniform sampler2D texm;\n"
1386 "varying vec2 tex_m;\n"
1387 "void main()\n"
1388 "{\n"
1389 " vec4 c;\n"
1390 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).grab;\n"
1391 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).grab;\n"
1392 " c = (col00 + col01) / div_s;\n"
1393 " float ma;\n"
1394 " ma = texture2D(texm, tex_m).a;\n"
1395 " gl_FragColor =\n"
1396 " c\n"
1397 " * col\n"
1398 " * ma\n"
1399 " ;\n"
1400 "}\n";
1401Evas_GL_Program_Source shader_img_12_bgra_mask_frag_src =
1402{
1403 img_12_bgra_mask_frag_glsl,
1404 NULL, 0
1405};
1406
1407static const char img_12_bgra_mask_vert_glsl[] =
1408 "#ifdef GL_ES\n"
1409 "precision highp float;\n"
1410 "#endif\n"
1411 "attribute vec4 vertex;\n"
1412 "uniform mat4 mvp;\n"
1413 "attribute vec4 color;\n"
1414 "varying vec4 col;\n"
1415 "attribute vec2 tex_coord;\n"
1416 "varying vec2 tex_c;\n"
1417 "attribute vec2 tex_sample;\n"
1418 "varying vec4 div_s;\n"
1419 "varying vec2 tex_s[2];\n"
1420 "attribute vec4 mask_coord;\n"
1421 "varying vec2 tex_m;\n"
1422 "void main()\n"
1423 "{\n"
1424 " gl_Position = mvp * vertex;\n"
1425 " col = color;\n"
1426 " tex_c = tex_coord;\n"
1427 " tex_s[0] = vec2(0, -tex_sample.y);\n"
1428 " tex_s[1] = vec2(0, tex_sample.y);\n"
1429 " div_s = vec4(2, 2, 2, 2);\n"
1430 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
1431 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
1432 "}\n";
1433Evas_GL_Program_Source shader_img_12_bgra_mask_vert_src =
1434{
1435 img_12_bgra_mask_vert_glsl,
1436 NULL, 0
1437};
1438
1439static const char img_21_bgra_mask_frag_glsl[] =
1440 "#ifdef GL_ES\n"
1441 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1442 "precision highp float;\n"
1443 "#else\n"
1444 "precision mediump float;\n"
1445 "#endif\n"
1446 "#endif\n"
1447 "varying vec4 col;\n"
1448 "uniform sampler2D tex;\n"
1449 "varying vec2 tex_c;\n"
1450 "varying vec4 div_s;\n"
1451 "varying vec2 tex_s[2];\n"
1452 "uniform sampler2D texm;\n"
1453 "varying vec2 tex_m;\n"
1454 "void main()\n"
1455 "{\n"
1456 " vec4 c;\n"
1457 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).grab;\n"
1458 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).grab;\n"
1459 " c = (col00 + col01) / div_s;\n"
1460 " float ma;\n"
1461 " ma = texture2D(texm, tex_m).a;\n"
1462 " gl_FragColor =\n"
1463 " c\n"
1464 " * col\n"
1465 " * ma\n"
1466 " ;\n"
1467 "}\n";
1468Evas_GL_Program_Source shader_img_21_bgra_mask_frag_src =
1469{
1470 img_21_bgra_mask_frag_glsl,
1471 NULL, 0
1472};
1473
1474static const char img_21_bgra_mask_vert_glsl[] =
1475 "#ifdef GL_ES\n"
1476 "precision highp float;\n"
1477 "#endif\n"
1478 "attribute vec4 vertex;\n"
1479 "uniform mat4 mvp;\n"
1480 "attribute vec4 color;\n"
1481 "varying vec4 col;\n"
1482 "attribute vec2 tex_coord;\n"
1483 "varying vec2 tex_c;\n"
1484 "attribute vec2 tex_sample;\n"
1485 "varying vec4 div_s;\n"
1486 "varying vec2 tex_s[2];\n"
1487 "attribute vec4 mask_coord;\n"
1488 "varying vec2 tex_m;\n"
1489 "void main()\n"
1490 "{\n"
1491 " gl_Position = mvp * vertex;\n"
1492 " col = color;\n"
1493 " tex_c = tex_coord;\n"
1494 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
1495 " tex_s[1] = vec2( tex_sample.x, 0);\n"
1496 " div_s = vec4(2, 2, 2, 2);\n"
1497 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
1498 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
1499 "}\n";
1500Evas_GL_Program_Source shader_img_21_bgra_mask_vert_src =
1501{
1502 img_21_bgra_mask_vert_glsl,
1503 NULL, 0
1504};
1505
1506static const char img_22_bgra_mask_frag_glsl[] =
1507 "#ifdef GL_ES\n"
1508 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1509 "precision highp float;\n"
1510 "#else\n"
1511 "precision mediump float;\n"
1512 "#endif\n"
1513 "#endif\n"
1514 "varying vec4 col;\n"
1515 "uniform sampler2D tex;\n"
1516 "varying vec2 tex_c;\n"
1517 "varying vec4 div_s;\n"
1518 "varying vec2 tex_s[4];\n"
1519 "uniform sampler2D texm;\n"
1520 "varying vec2 tex_m;\n"
1521 "void main()\n"
1522 "{\n"
1523 " vec4 c;\n"
1524 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).grab;\n"
1525 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).grab;\n"
1526 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).grab;\n"
1527 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).grab;\n"
1528 " c = (col00 + col01 + col10 + col11) / div_s;\n"
1529 " float ma;\n"
1530 " ma = texture2D(texm, tex_m).a;\n"
1531 " gl_FragColor =\n"
1532 " c\n"
1533 " * col\n"
1534 " * ma\n"
1535 " ;\n"
1536 "}\n";
1537Evas_GL_Program_Source shader_img_22_bgra_mask_frag_src =
1538{
1539 img_22_bgra_mask_frag_glsl,
1540 NULL, 0
1541};
1542
1543static const char img_22_bgra_mask_vert_glsl[] =
1544 "#ifdef GL_ES\n"
1545 "precision highp float;\n"
1546 "#endif\n"
1547 "attribute vec4 vertex;\n"
1548 "uniform mat4 mvp;\n"
1549 "attribute vec4 color;\n"
1550 "varying vec4 col;\n"
1551 "attribute vec2 tex_coord;\n"
1552 "varying vec2 tex_c;\n"
1553 "attribute vec2 tex_sample;\n"
1554 "varying vec4 div_s;\n"
1555 "varying vec2 tex_s[4];\n"
1556 "attribute vec4 mask_coord;\n"
1557 "varying vec2 tex_m;\n"
1558 "void main()\n"
1559 "{\n"
1560 " gl_Position = mvp * vertex;\n"
1561 " col = color;\n"
1562 " tex_c = tex_coord;\n"
1563 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
1564 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
1565 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
1566 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
1567 " div_s = vec4(4, 4, 4, 4);\n"
1568 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
1569 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
1570 "}\n";
1571Evas_GL_Program_Source shader_img_22_bgra_mask_vert_src =
1572{
1573 img_22_bgra_mask_vert_glsl,
1574 NULL, 0
1575};
1576
1577static const char img_nomul_frag_glsl[] =
1578 "#ifdef GL_ES\n"
1579 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1580 "precision highp float;\n"
1581 "#else\n"
1582 "precision mediump float;\n"
1583 "#endif\n"
1584 "#endif\n"
1585 "uniform sampler2D tex;\n"
1586 "varying vec2 tex_c;\n"
1587 "void main()\n"
1588 "{\n"
1589 " vec4 c;\n"
1590 " c = texture2D(tex, tex_c).gbar;\n"
1591 " gl_FragColor =\n"
1592 " c\n"
1593 " ;\n"
1594 "}\n";
1595Evas_GL_Program_Source shader_img_nomul_frag_src =
1596{
1597 img_nomul_frag_glsl,
1598 NULL, 0
1599};
1600
1601static const char img_nomul_vert_glsl[] =
1602 "#ifdef GL_ES\n"
1603 "precision highp float;\n"
1604 "#endif\n"
1605 "attribute vec4 vertex;\n"
1606 "uniform mat4 mvp;\n"
1607 "attribute vec2 tex_coord;\n"
1608 "varying vec2 tex_c;\n"
1609 "void main()\n"
1610 "{\n"
1611 " gl_Position = mvp * vertex;\n"
1612 " tex_c = tex_coord;\n"
1613 "}\n";
1614Evas_GL_Program_Source shader_img_nomul_vert_src =
1615{
1616 img_nomul_vert_glsl,
1617 NULL, 0
1618};
1619
1620static const char img_bgra_nomul_frag_glsl[] =
1621 "#ifdef GL_ES\n"
1622 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1623 "precision highp float;\n"
1624 "#else\n"
1625 "precision mediump float;\n"
1626 "#endif\n"
1627 "#endif\n"
1628 "uniform sampler2D tex;\n"
1629 "varying vec2 tex_c;\n"
1630 "void main()\n"
1631 "{\n"
1632 " vec4 c;\n"
1633 " c = texture2D(tex, tex_c).grab;\n"
1634 " gl_FragColor =\n"
1635 " c\n"
1636 " ;\n"
1637 "}\n";
1638Evas_GL_Program_Source shader_img_bgra_nomul_frag_src =
1639{
1640 img_bgra_nomul_frag_glsl,
1641 NULL, 0
1642};
1643
1644static const char img_bgra_nomul_vert_glsl[] =
1645 "#ifdef GL_ES\n"
1646 "precision highp float;\n"
1647 "#endif\n"
1648 "attribute vec4 vertex;\n"
1649 "uniform mat4 mvp;\n"
1650 "attribute vec2 tex_coord;\n"
1651 "varying vec2 tex_c;\n"
1652 "void main()\n"
1653 "{\n"
1654 " gl_Position = mvp * vertex;\n"
1655 " tex_c = tex_coord;\n"
1656 "}\n";
1657Evas_GL_Program_Source shader_img_bgra_nomul_vert_src =
1658{
1659 img_bgra_nomul_vert_glsl,
1660 NULL, 0
1661};
1662
1663static const char img_12_nomul_frag_glsl[] =
1664 "#ifdef GL_ES\n"
1665 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1666 "precision highp float;\n"
1667 "#else\n"
1668 "precision mediump float;\n"
1669 "#endif\n"
1670 "#endif\n"
1671 "uniform sampler2D tex;\n"
1672 "varying vec2 tex_c;\n"
1673 "varying vec4 div_s;\n"
1674 "varying vec2 tex_s[2];\n"
1675 "void main()\n"
1676 "{\n"
1677 " vec4 c;\n"
1678 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).gbar;\n"
1679 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).gbar;\n"
1680 " c = (col00 + col01) / div_s;\n"
1681 " gl_FragColor =\n"
1682 " c\n"
1683 " ;\n"
1684 "}\n";
1685Evas_GL_Program_Source shader_img_12_nomul_frag_src =
1686{
1687 img_12_nomul_frag_glsl,
1688 NULL, 0
1689};
1690
1691static const char img_12_nomul_vert_glsl[] =
1692 "#ifdef GL_ES\n"
1693 "precision highp float;\n"
1694 "#endif\n"
1695 "attribute vec4 vertex;\n"
1696 "uniform mat4 mvp;\n"
1697 "attribute vec2 tex_coord;\n"
1698 "varying vec2 tex_c;\n"
1699 "attribute vec2 tex_sample;\n"
1700 "varying vec4 div_s;\n"
1701 "varying vec2 tex_s[2];\n"
1702 "void main()\n"
1703 "{\n"
1704 " gl_Position = mvp * vertex;\n"
1705 " tex_c = tex_coord;\n"
1706 " tex_s[0] = vec2(0, -tex_sample.y);\n"
1707 " tex_s[1] = vec2(0, tex_sample.y);\n"
1708 " div_s = vec4(2, 2, 2, 2);\n"
1709 "}\n";
1710Evas_GL_Program_Source shader_img_12_nomul_vert_src =
1711{
1712 img_12_nomul_vert_glsl,
1713 NULL, 0
1714};
1715
1716static const char img_21_nomul_frag_glsl[] =
1717 "#ifdef GL_ES\n"
1718 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1719 "precision highp float;\n"
1720 "#else\n"
1721 "precision mediump float;\n"
1722 "#endif\n"
1723 "#endif\n"
1724 "uniform sampler2D tex;\n"
1725 "varying vec2 tex_c;\n"
1726 "varying vec4 div_s;\n"
1727 "varying vec2 tex_s[2];\n"
1728 "void main()\n"
1729 "{\n"
1730 " vec4 c;\n"
1731 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).gbar;\n"
1732 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).gbar;\n"
1733 " c = (col00 + col01) / div_s;\n"
1734 " gl_FragColor =\n"
1735 " c\n"
1736 " ;\n"
1737 "}\n";
1738Evas_GL_Program_Source shader_img_21_nomul_frag_src =
1739{
1740 img_21_nomul_frag_glsl,
1741 NULL, 0
1742};
1743
1744static const char img_21_nomul_vert_glsl[] =
1745 "#ifdef GL_ES\n"
1746 "precision highp float;\n"
1747 "#endif\n"
1748 "attribute vec4 vertex;\n"
1749 "uniform mat4 mvp;\n"
1750 "attribute vec2 tex_coord;\n"
1751 "varying vec2 tex_c;\n"
1752 "attribute vec2 tex_sample;\n"
1753 "varying vec4 div_s;\n"
1754 "varying vec2 tex_s[2];\n"
1755 "void main()\n"
1756 "{\n"
1757 " gl_Position = mvp * vertex;\n"
1758 " tex_c = tex_coord;\n"
1759 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
1760 " tex_s[1] = vec2( tex_sample.x, 0);\n"
1761 " div_s = vec4(2, 2, 2, 2);\n"
1762 "}\n";
1763Evas_GL_Program_Source shader_img_21_nomul_vert_src =
1764{
1765 img_21_nomul_vert_glsl,
1766 NULL, 0
1767};
1768
1769static const char img_22_nomul_frag_glsl[] =
1770 "#ifdef GL_ES\n"
1771 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1772 "precision highp float;\n"
1773 "#else\n"
1774 "precision mediump float;\n"
1775 "#endif\n"
1776 "#endif\n"
1777 "uniform sampler2D tex;\n"
1778 "varying vec2 tex_c;\n"
1779 "varying vec4 div_s;\n"
1780 "varying vec2 tex_s[4];\n"
1781 "void main()\n"
1782 "{\n"
1783 " vec4 c;\n"
1784 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).gbar;\n"
1785 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).gbar;\n"
1786 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).gbar;\n"
1787 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).gbar;\n"
1788 " c = (col00 + col01 + col10 + col11) / div_s;\n"
1789 " gl_FragColor =\n"
1790 " c\n"
1791 " ;\n"
1792 "}\n";
1793Evas_GL_Program_Source shader_img_22_nomul_frag_src =
1794{
1795 img_22_nomul_frag_glsl,
1796 NULL, 0
1797};
1798
1799static const char img_22_nomul_vert_glsl[] =
1800 "#ifdef GL_ES\n"
1801 "precision highp float;\n"
1802 "#endif\n"
1803 "attribute vec4 vertex;\n"
1804 "uniform mat4 mvp;\n"
1805 "attribute vec2 tex_coord;\n"
1806 "varying vec2 tex_c;\n"
1807 "attribute vec2 tex_sample;\n"
1808 "varying vec4 div_s;\n"
1809 "varying vec2 tex_s[4];\n"
1810 "void main()\n"
1811 "{\n"
1812 " gl_Position = mvp * vertex;\n"
1813 " tex_c = tex_coord;\n"
1814 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
1815 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
1816 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
1817 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
1818 " div_s = vec4(4, 4, 4, 4);\n"
1819 "}\n";
1820Evas_GL_Program_Source shader_img_22_nomul_vert_src =
1821{
1822 img_22_nomul_vert_glsl,
1823 NULL, 0
1824};
1825
1826static const char img_12_bgra_nomul_frag_glsl[] =
1827 "#ifdef GL_ES\n"
1828 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1829 "precision highp float;\n"
1830 "#else\n"
1831 "precision mediump float;\n"
1832 "#endif\n"
1833 "#endif\n"
1834 "uniform sampler2D tex;\n"
1835 "varying vec2 tex_c;\n"
1836 "varying vec4 div_s;\n"
1837 "varying vec2 tex_s[2];\n"
1838 "void main()\n"
1839 "{\n"
1840 " vec4 c;\n"
1841 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).grab;\n"
1842 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).grab;\n"
1843 " c = (col00 + col01) / div_s;\n"
1844 " gl_FragColor =\n"
1845 " c\n"
1846 " ;\n"
1847 "}\n";
1848Evas_GL_Program_Source shader_img_12_bgra_nomul_frag_src =
1849{
1850 img_12_bgra_nomul_frag_glsl,
1851 NULL, 0
1852};
1853
1854static const char img_12_bgra_nomul_vert_glsl[] =
1855 "#ifdef GL_ES\n"
1856 "precision highp float;\n"
1857 "#endif\n"
1858 "attribute vec4 vertex;\n"
1859 "uniform mat4 mvp;\n"
1860 "attribute vec2 tex_coord;\n"
1861 "varying vec2 tex_c;\n"
1862 "attribute vec2 tex_sample;\n"
1863 "varying vec4 div_s;\n"
1864 "varying vec2 tex_s[2];\n"
1865 "void main()\n"
1866 "{\n"
1867 " gl_Position = mvp * vertex;\n"
1868 " tex_c = tex_coord;\n"
1869 " tex_s[0] = vec2(0, -tex_sample.y);\n"
1870 " tex_s[1] = vec2(0, tex_sample.y);\n"
1871 " div_s = vec4(2, 2, 2, 2);\n"
1872 "}\n";
1873Evas_GL_Program_Source shader_img_12_bgra_nomul_vert_src =
1874{
1875 img_12_bgra_nomul_vert_glsl,
1876 NULL, 0
1877};
1878
1879static const char img_21_bgra_nomul_frag_glsl[] =
1880 "#ifdef GL_ES\n"
1881 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1882 "precision highp float;\n"
1883 "#else\n"
1884 "precision mediump float;\n"
1885 "#endif\n"
1886 "#endif\n"
1887 "uniform sampler2D tex;\n"
1888 "varying vec2 tex_c;\n"
1889 "varying vec4 div_s;\n"
1890 "varying vec2 tex_s[2];\n"
1891 "void main()\n"
1892 "{\n"
1893 " vec4 c;\n"
1894 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).grab;\n"
1895 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).grab;\n"
1896 " c = (col00 + col01) / div_s;\n"
1897 " gl_FragColor =\n"
1898 " c\n"
1899 " ;\n"
1900 "}\n";
1901Evas_GL_Program_Source shader_img_21_bgra_nomul_frag_src =
1902{
1903 img_21_bgra_nomul_frag_glsl,
1904 NULL, 0
1905};
1906
1907static const char img_21_bgra_nomul_vert_glsl[] =
1908 "#ifdef GL_ES\n"
1909 "precision highp float;\n"
1910 "#endif\n"
1911 "attribute vec4 vertex;\n"
1912 "uniform mat4 mvp;\n"
1913 "attribute vec2 tex_coord;\n"
1914 "varying vec2 tex_c;\n"
1915 "attribute vec2 tex_sample;\n"
1916 "varying vec4 div_s;\n"
1917 "varying vec2 tex_s[2];\n"
1918 "void main()\n"
1919 "{\n"
1920 " gl_Position = mvp * vertex;\n"
1921 " tex_c = tex_coord;\n"
1922 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
1923 " tex_s[1] = vec2( tex_sample.x, 0);\n"
1924 " div_s = vec4(2, 2, 2, 2);\n"
1925 "}\n";
1926Evas_GL_Program_Source shader_img_21_bgra_nomul_vert_src =
1927{
1928 img_21_bgra_nomul_vert_glsl,
1929 NULL, 0
1930};
1931
1932static const char img_22_bgra_nomul_frag_glsl[] =
1933 "#ifdef GL_ES\n"
1934 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1935 "precision highp float;\n"
1936 "#else\n"
1937 "precision mediump float;\n"
1938 "#endif\n"
1939 "#endif\n"
1940 "uniform sampler2D tex;\n"
1941 "varying vec2 tex_c;\n"
1942 "varying vec4 div_s;\n"
1943 "varying vec2 tex_s[4];\n"
1944 "void main()\n"
1945 "{\n"
1946 " vec4 c;\n"
1947 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).grab;\n"
1948 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).grab;\n"
1949 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).grab;\n"
1950 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).grab;\n"
1951 " c = (col00 + col01 + col10 + col11) / div_s;\n"
1952 " gl_FragColor =\n"
1953 " c\n"
1954 " ;\n"
1955 "}\n";
1956Evas_GL_Program_Source shader_img_22_bgra_nomul_frag_src =
1957{
1958 img_22_bgra_nomul_frag_glsl,
1959 NULL, 0
1960};
1961
1962static const char img_22_bgra_nomul_vert_glsl[] =
1963 "#ifdef GL_ES\n"
1964 "precision highp float;\n"
1965 "#endif\n"
1966 "attribute vec4 vertex;\n"
1967 "uniform mat4 mvp;\n"
1968 "attribute vec2 tex_coord;\n"
1969 "varying vec2 tex_c;\n"
1970 "attribute vec2 tex_sample;\n"
1971 "varying vec4 div_s;\n"
1972 "varying vec2 tex_s[4];\n"
1973 "void main()\n"
1974 "{\n"
1975 " gl_Position = mvp * vertex;\n"
1976 " tex_c = tex_coord;\n"
1977 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
1978 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
1979 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
1980 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
1981 " div_s = vec4(4, 4, 4, 4);\n"
1982 "}\n";
1983Evas_GL_Program_Source shader_img_22_bgra_nomul_vert_src =
1984{
1985 img_22_bgra_nomul_vert_glsl,
1986 NULL, 0
1987};
1988
1989static const char img_mask_nomul_frag_glsl[] =
1990 "#ifdef GL_ES\n"
1991 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1992 "precision highp float;\n"
1993 "#else\n"
1994 "precision mediump float;\n"
1995 "#endif\n"
1996 "#endif\n"
1997 "uniform sampler2D tex;\n"
1998 "varying vec2 tex_c;\n"
1999 "uniform sampler2D texm;\n"
2000 "varying vec2 tex_m;\n"
2001 "void main()\n"
2002 "{\n"
2003 " vec4 c;\n"
2004 " c = texture2D(tex, tex_c).gbar;\n"
2005 " float ma;\n"
2006 " ma = texture2D(texm, tex_m).a;\n"
2007 " gl_FragColor =\n"
2008 " c\n"
2009 " * ma\n"
2010 " ;\n"
2011 "}\n";
2012Evas_GL_Program_Source shader_img_mask_nomul_frag_src =
2013{
2014 img_mask_nomul_frag_glsl,
2015 NULL, 0
2016};
2017
2018static const char img_mask_nomul_vert_glsl[] =
2019 "#ifdef GL_ES\n"
2020 "precision highp float;\n"
2021 "#endif\n"
2022 "attribute vec4 vertex;\n"
2023 "uniform mat4 mvp;\n"
2024 "attribute vec2 tex_coord;\n"
2025 "varying vec2 tex_c;\n"
2026 "attribute vec4 mask_coord;\n"
2027 "varying vec2 tex_m;\n"
2028 "void main()\n"
2029 "{\n"
2030 " gl_Position = mvp * vertex;\n"
2031 " tex_c = tex_coord;\n"
2032 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
2033 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
2034 "}\n";
2035Evas_GL_Program_Source shader_img_mask_nomul_vert_src =
2036{
2037 img_mask_nomul_vert_glsl,
2038 NULL, 0
2039};
2040
2041static const char img_bgra_mask_nomul_frag_glsl[] =
2042 "#ifdef GL_ES\n"
2043 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
2044 "precision highp float;\n"
2045 "#else\n"
2046 "precision mediump float;\n"
2047 "#endif\n"
2048 "#endif\n"
2049 "uniform sampler2D tex;\n"
2050 "varying vec2 tex_c;\n"
2051 "uniform sampler2D texm;\n"
2052 "varying vec2 tex_m;\n"
2053 "void main()\n"
2054 "{\n"
2055 " vec4 c;\n"
2056 " c = texture2D(tex, tex_c).grab;\n"
2057 " float ma;\n"
2058 " ma = texture2D(texm, tex_m).a;\n"
2059 " gl_FragColor =\n"
2060 " c\n"
2061 " * ma\n"
2062 " ;\n"
2063 "}\n";
2064Evas_GL_Program_Source shader_img_bgra_mask_nomul_frag_src =
2065{
2066 img_bgra_mask_nomul_frag_glsl,
2067 NULL, 0
2068};
2069
2070static const char img_bgra_mask_nomul_vert_glsl[] =
2071 "#ifdef GL_ES\n"
2072 "precision highp float;\n"
2073 "#endif\n"
2074 "attribute vec4 vertex;\n"
2075 "uniform mat4 mvp;\n"
2076 "attribute vec2 tex_coord;\n"
2077 "varying vec2 tex_c;\n"
2078 "attribute vec4 mask_coord;\n"
2079 "varying vec2 tex_m;\n"
2080 "void main()\n"
2081 "{\n"
2082 " gl_Position = mvp * vertex;\n"
2083 " tex_c = tex_coord;\n"
2084 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
2085 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
2086 "}\n";
2087Evas_GL_Program_Source shader_img_bgra_mask_nomul_vert_src =
2088{
2089 img_bgra_mask_nomul_vert_glsl,
2090 NULL, 0
2091};
2092
2093static const char img_12_mask_nomul_frag_glsl[] =
2094 "#ifdef GL_ES\n"
2095 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
2096 "precision highp float;\n"
2097 "#else\n"
2098 "precision mediump float;\n"
2099 "#endif\n"
2100 "#endif\n"
2101 "uniform sampler2D tex;\n"
2102 "varying vec2 tex_c;\n"
2103 "varying vec4 div_s;\n"
2104 "varying vec2 tex_s[2];\n"
2105 "uniform sampler2D texm;\n"
2106 "varying vec2 tex_m;\n"
2107 "void main()\n"
2108 "{\n"
2109 " vec4 c;\n"
2110 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).gbar;\n"
2111 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).gbar;\n"
2112 " c = (col00 + col01) / div_s;\n"
2113 " float ma;\n"
2114 " ma = texture2D(texm, tex_m).a;\n"
2115 " gl_FragColor =\n"
2116 " c\n"
2117 " * ma\n"
2118 " ;\n"
2119 "}\n";
2120Evas_GL_Program_Source shader_img_12_mask_nomul_frag_src =
2121{
2122 img_12_mask_nomul_frag_glsl,
2123 NULL, 0
2124};
2125
2126static const char img_12_mask_nomul_vert_glsl[] =
2127 "#ifdef GL_ES\n"
2128 "precision highp float;\n"
2129 "#endif\n"
2130 "attribute vec4 vertex;\n"
2131 "uniform mat4 mvp;\n"
2132 "attribute vec2 tex_coord;\n"
2133 "varying vec2 tex_c;\n"
2134 "attribute vec2 tex_sample;\n"
2135 "varying vec4 div_s;\n"
2136 "varying vec2 tex_s[2];\n"
2137 "attribute vec4 mask_coord;\n"
2138 "varying vec2 tex_m;\n"
2139 "void main()\n"
2140 "{\n"
2141 " gl_Position = mvp * vertex;\n"
2142 " tex_c = tex_coord;\n"
2143 " tex_s[0] = vec2(0, -tex_sample.y);\n"
2144 " tex_s[1] = vec2(0, tex_sample.y);\n"
2145 " div_s = vec4(2, 2, 2, 2);\n"
2146 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
2147 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
2148 "}\n";
2149Evas_GL_Program_Source shader_img_12_mask_nomul_vert_src =
2150{
2151 img_12_mask_nomul_vert_glsl,
2152 NULL, 0
2153};
2154
2155static const char img_21_mask_nomul_frag_glsl[] =
2156 "#ifdef GL_ES\n"
2157 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
2158 "precision highp float;\n"
2159 "#else\n"
2160 "precision mediump float;\n"
2161 "#endif\n"
2162 "#endif\n"
2163 "uniform sampler2D tex;\n"
2164 "varying vec2 tex_c;\n"
2165 "varying vec4 div_s;\n"
2166 "varying vec2 tex_s[2];\n"
2167 "uniform sampler2D texm;\n"
2168 "varying vec2 tex_m;\n"
2169 "void main()\n"
2170 "{\n"
2171 " vec4 c;\n"
2172 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).gbar;\n"
2173 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).gbar;\n"
2174 " c = (col00 + col01) / div_s;\n"
2175 " float ma;\n"
2176 " ma = texture2D(texm, tex_m).a;\n"
2177 " gl_FragColor =\n"
2178 " c\n"
2179 " * ma\n"
2180 " ;\n"
2181 "}\n";
2182Evas_GL_Program_Source shader_img_21_mask_nomul_frag_src =
2183{
2184 img_21_mask_nomul_frag_glsl,
2185 NULL, 0
2186};
2187
2188static const char img_21_mask_nomul_vert_glsl[] =
2189 "#ifdef GL_ES\n"
2190 "precision highp float;\n"
2191 "#endif\n"
2192 "attribute vec4 vertex;\n"
2193 "uniform mat4 mvp;\n"
2194 "attribute vec2 tex_coord;\n"
2195 "varying vec2 tex_c;\n"
2196 "attribute vec2 tex_sample;\n"
2197 "varying vec4 div_s;\n"
2198 "varying vec2 tex_s[2];\n"
2199 "attribute vec4 mask_coord;\n"
2200 "varying vec2 tex_m;\n"
2201 "void main()\n"
2202 "{\n"
2203 " gl_Position = mvp * vertex;\n"
2204 " tex_c = tex_coord;\n"
2205 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
2206 " tex_s[1] = vec2( tex_sample.x, 0);\n"
2207 " div_s = vec4(2, 2, 2, 2);\n"
2208 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
2209 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
2210 "}\n";
2211Evas_GL_Program_Source shader_img_21_mask_nomul_vert_src =
2212{
2213 img_21_mask_nomul_vert_glsl,
2214 NULL, 0
2215};
2216
2217static const char img_22_mask_nomul_frag_glsl[] =
2218 "#ifdef GL_ES\n"
2219 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
2220 "precision highp float;\n"
2221 "#else\n"
2222 "precision mediump float;\n"
2223 "#endif\n"
2224 "#endif\n"
2225 "uniform sampler2D tex;\n"
2226 "varying vec2 tex_c;\n"
2227 "varying vec4 div_s;\n"
2228 "varying vec2 tex_s[4];\n"
2229 "uniform sampler2D texm;\n"
2230 "varying vec2 tex_m;\n"
2231 "void main()\n"
2232 "{\n"
2233 " vec4 c;\n"
2234 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).gbar;\n"
2235 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).gbar;\n"
2236 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).gbar;\n"
2237 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).gbar;\n"
2238 " c = (col00 + col01 + col10 + col11) / div_s;\n"
2239 " float ma;\n"
2240 " ma = texture2D(texm, tex_m).a;\n"
2241 " gl_FragColor =\n"
2242 " c\n"
2243 " * ma\n"
2244 " ;\n"
2245 "}\n";
2246Evas_GL_Program_Source shader_img_22_mask_nomul_frag_src =
2247{
2248 img_22_mask_nomul_frag_glsl,
2249 NULL, 0
2250};
2251
2252static const char img_22_mask_nomul_vert_glsl[] =
2253 "#ifdef GL_ES\n"
2254 "precision highp float;\n"
2255 "#endif\n"
2256 "attribute vec4 vertex;\n"
2257 "uniform mat4 mvp;\n"
2258 "attribute vec2 tex_coord;\n"
2259 "varying vec2 tex_c;\n"
2260 "attribute vec2 tex_sample;\n"
2261 "varying vec4 div_s;\n"
2262 "varying vec2 tex_s[4];\n"
2263 "attribute vec4 mask_coord;\n"
2264 "varying vec2 tex_m;\n"
2265 "void main()\n"
2266 "{\n"
2267 " gl_Position = mvp * vertex;\n"
2268 " tex_c = tex_coord;\n"
2269 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
2270 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
2271 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
2272 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
2273 " div_s = vec4(4, 4, 4, 4);\n"
2274 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
2275 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
2276 "}\n";
2277Evas_GL_Program_Source shader_img_22_mask_nomul_vert_src =
2278{
2279 img_22_mask_nomul_vert_glsl,
2280 NULL, 0
2281};
2282
2283static const char img_12_bgra_mask_nomul_frag_glsl[] =
2284 "#ifdef GL_ES\n"
2285 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
2286 "precision highp float;\n"
2287 "#else\n"
2288 "precision mediump float;\n"
2289 "#endif\n"
2290 "#endif\n"
2291 "uniform sampler2D tex;\n"
2292 "varying vec2 tex_c;\n"
2293 "varying vec4 div_s;\n"
2294 "varying vec2 tex_s[2];\n"
2295 "uniform sampler2D texm;\n"
2296 "varying vec2 tex_m;\n"
2297 "void main()\n"
2298 "{\n"
2299 " vec4 c;\n"
2300 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).grab;\n"
2301 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).grab;\n"
2302 " c = (col00 + col01) / div_s;\n"
2303 " float ma;\n"
2304 " ma = texture2D(texm, tex_m).a;\n"
2305 " gl_FragColor =\n"
2306 " c\n"
2307 " * ma\n"
2308 " ;\n"
2309 "}\n";
2310Evas_GL_Program_Source shader_img_12_bgra_mask_nomul_frag_src =
2311{
2312 img_12_bgra_mask_nomul_frag_glsl,
2313 NULL, 0
2314};
2315
2316static const char img_12_bgra_mask_nomul_vert_glsl[] =
2317 "#ifdef GL_ES\n"
2318 "precision highp float;\n"
2319 "#endif\n"
2320 "attribute vec4 vertex;\n"
2321 "uniform mat4 mvp;\n"
2322 "attribute vec2 tex_coord;\n"
2323 "varying vec2 tex_c;\n"
2324 "attribute vec2 tex_sample;\n"
2325 "varying vec4 div_s;\n"
2326 "varying vec2 tex_s[2];\n"
2327 "attribute vec4 mask_coord;\n"
2328 "varying vec2 tex_m;\n"
2329 "void main()\n"
2330 "{\n"
2331 " gl_Position = mvp * vertex;\n"
2332 " tex_c = tex_coord;\n"
2333 " tex_s[0] = vec2(0, -tex_sample.y);\n"
2334 " tex_s[1] = vec2(0, tex_sample.y);\n"
2335 " div_s = vec4(2, 2, 2, 2);\n"
2336 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
2337 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
2338 "}\n";
2339Evas_GL_Program_Source shader_img_12_bgra_mask_nomul_vert_src =
2340{
2341 img_12_bgra_mask_nomul_vert_glsl,
2342 NULL, 0
2343};
2344
2345static const char img_21_bgra_mask_nomul_frag_glsl[] =
2346 "#ifdef GL_ES\n"
2347 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
2348 "precision highp float;\n"
2349 "#else\n"
2350 "precision mediump float;\n"
2351 "#endif\n"
2352 "#endif\n"
2353 "uniform sampler2D tex;\n"
2354 "varying vec2 tex_c;\n"
2355 "varying vec4 div_s;\n"
2356 "varying vec2 tex_s[2];\n"
2357 "uniform sampler2D texm;\n"
2358 "varying vec2 tex_m;\n"
2359 "void main()\n"
2360 "{\n"
2361 " vec4 c;\n"
2362 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).grab;\n"
2363 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).grab;\n"
2364 " c = (col00 + col01) / div_s;\n"
2365 " float ma;\n"
2366 " ma = texture2D(texm, tex_m).a;\n"
2367 " gl_FragColor =\n"
2368 " c\n"
2369 " * ma\n"
2370 " ;\n"
2371 "}\n";
2372Evas_GL_Program_Source shader_img_21_bgra_mask_nomul_frag_src =
2373{
2374 img_21_bgra_mask_nomul_frag_glsl,
2375 NULL, 0
2376};
2377
2378static const char img_21_bgra_mask_nomul_vert_glsl[] =
2379 "#ifdef GL_ES\n"
2380 "precision highp float;\n"
2381 "#endif\n"
2382 "attribute vec4 vertex;\n"
2383 "uniform mat4 mvp;\n"
2384 "attribute vec2 tex_coord;\n"
2385 "varying vec2 tex_c;\n"
2386 "attribute vec2 tex_sample;\n"
2387 "varying vec4 div_s;\n"
2388 "varying vec2 tex_s[2];\n"
2389 "attribute vec4 mask_coord;\n"
2390 "varying vec2 tex_m;\n"
2391 "void main()\n"
2392 "{\n"
2393 " gl_Position = mvp * vertex;\n"
2394 " tex_c = tex_coord;\n"
2395 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
2396 " tex_s[1] = vec2( tex_sample.x, 0);\n"
2397 " div_s = vec4(2, 2, 2, 2);\n"
2398 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
2399 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
2400 "}\n";
2401Evas_GL_Program_Source shader_img_21_bgra_mask_nomul_vert_src =
2402{
2403 img_21_bgra_mask_nomul_vert_glsl,
2404 NULL, 0
2405};
2406
2407static const char img_22_bgra_mask_nomul_frag_glsl[] =
2408 "#ifdef GL_ES\n"
2409 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
2410 "precision highp float;\n"
2411 "#else\n"
2412 "precision mediump float;\n"
2413 "#endif\n"
2414 "#endif\n"
2415 "uniform sampler2D tex;\n"
2416 "varying vec2 tex_c;\n"
2417 "varying vec4 div_s;\n"
2418 "varying vec2 tex_s[4];\n"
2419 "uniform sampler2D texm;\n"
2420 "varying vec2 tex_m;\n"
2421 "void main()\n"
2422 "{\n"
2423 " vec4 c;\n"
2424 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).grab;\n"
2425 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).grab;\n"
2426 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).grab;\n"
2427 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).grab;\n"
2428 " c = (col00 + col01 + col10 + col11) / div_s;\n"
2429 " float ma;\n"
2430 " ma = texture2D(texm, tex_m).a;\n"
2431 " gl_FragColor =\n"
2432 " c\n"
2433 " * ma\n"
2434 " ;\n"
2435 "}\n";
2436Evas_GL_Program_Source shader_img_22_bgra_mask_nomul_frag_src =
2437{
2438 img_22_bgra_mask_nomul_frag_glsl,
2439 NULL, 0
2440};
2441
2442static const char img_22_bgra_mask_nomul_vert_glsl[] =
2443 "#ifdef GL_ES\n"
2444 "precision highp float;\n"
2445 "#endif\n"
2446 "attribute vec4 vertex;\n"
2447 "uniform mat4 mvp;\n"
2448 "attribute vec2 tex_coord;\n"
2449 "varying vec2 tex_c;\n"
2450 "attribute vec2 tex_sample;\n"
2451 "varying vec4 div_s;\n"
2452 "varying vec2 tex_s[4];\n"
2453 "attribute vec4 mask_coord;\n"
2454 "varying vec2 tex_m;\n"
2455 "void main()\n"
2456 "{\n"
2457 " gl_Position = mvp * vertex;\n"
2458 " tex_c = tex_coord;\n"
2459 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
2460 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
2461 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
2462 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
2463 " div_s = vec4(4, 4, 4, 4);\n"
2464 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
2465 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
2466 "}\n";
2467Evas_GL_Program_Source shader_img_22_bgra_mask_nomul_vert_src =
2468{
2469 img_22_bgra_mask_nomul_vert_glsl,
2470 NULL, 0
2471};
2472
2473static const char img_mask12_frag_glsl[] =
2474 "#ifdef GL_ES\n"
2475 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
2476 "precision highp float;\n"
2477 "#else\n"
2478 "precision mediump float;\n"
2479 "#endif\n"
2480 "#endif\n"
2481 "varying vec4 col;\n"
2482 "uniform sampler2D tex;\n"
2483 "varying vec2 tex_c;\n"
2484 "uniform sampler2D texm;\n"
2485 "varying vec2 tex_m;\n"
2486 "varying float maskdiv_s;\n"
2487 "varying vec2 masktex_s[2];\n"
2488 "void main()\n"
2489 "{\n"
2490 " vec4 c;\n"
2491 " c = texture2D(tex, tex_c).gbar;\n"
2492 " float ma;\n"
2493 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
2494 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
2495 " ma = (ma00 + ma01) / maskdiv_s;\n"
2496 " gl_FragColor =\n"
2497 " c\n"
2498 " * col\n"
2499 " * ma\n"
2500 " ;\n"
2501 "}\n";
2502Evas_GL_Program_Source shader_img_mask12_frag_src =
2503{
2504 img_mask12_frag_glsl,
2505 NULL, 0
2506};
2507
2508static const char img_mask12_vert_glsl[] =
2509 "#ifdef GL_ES\n"
2510 "precision highp float;\n"
2511 "#endif\n"
2512 "attribute vec4 vertex;\n"
2513 "uniform mat4 mvp;\n"
2514 "attribute vec4 color;\n"
2515 "varying vec4 col;\n"
2516 "attribute vec2 tex_coord;\n"
2517 "varying vec2 tex_c;\n"
2518 "attribute vec4 mask_coord;\n"
2519 "varying vec2 tex_m;\n"
2520 "attribute vec2 tex_masksample;\n"
2521 "varying float maskdiv_s;\n"
2522 "varying vec2 masktex_s[2];\n"
2523 "void main()\n"
2524 "{\n"
2525 " gl_Position = mvp * vertex;\n"
2526 " col = color;\n"
2527 " tex_c = tex_coord;\n"
2528 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
2529 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
2530 " maskdiv_s = 2.0;\n"
2531 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
2532 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
2533 "}\n";
2534Evas_GL_Program_Source shader_img_mask12_vert_src =
2535{
2536 img_mask12_vert_glsl,
2537 NULL, 0
2538};
2539
2540static const char img_bgra_mask12_frag_glsl[] =
2541 "#ifdef GL_ES\n"
2542 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
2543 "precision highp float;\n"
2544 "#else\n"
2545 "precision mediump float;\n"
2546 "#endif\n"
2547 "#endif\n"
2548 "varying vec4 col;\n"
2549 "uniform sampler2D tex;\n"
2550 "varying vec2 tex_c;\n"
2551 "uniform sampler2D texm;\n"
2552 "varying vec2 tex_m;\n"
2553 "varying float maskdiv_s;\n"
2554 "varying vec2 masktex_s[2];\n"
2555 "void main()\n"
2556 "{\n"
2557 " vec4 c;\n"
2558 " c = texture2D(tex, tex_c).grab;\n"
2559 " float ma;\n"
2560 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
2561 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
2562 " ma = (ma00 + ma01) / maskdiv_s;\n"
2563 " gl_FragColor =\n"
2564 " c\n"
2565 " * col\n"
2566 " * ma\n"
2567 " ;\n"
2568 "}\n";
2569Evas_GL_Program_Source shader_img_bgra_mask12_frag_src =
2570{
2571 img_bgra_mask12_frag_glsl,
2572 NULL, 0
2573};
2574
2575static const char img_bgra_mask12_vert_glsl[] =
2576 "#ifdef GL_ES\n"
2577 "precision highp float;\n"
2578 "#endif\n"
2579 "attribute vec4 vertex;\n"
2580 "uniform mat4 mvp;\n"
2581 "attribute vec4 color;\n"
2582 "varying vec4 col;\n"
2583 "attribute vec2 tex_coord;\n"
2584 "varying vec2 tex_c;\n"
2585 "attribute vec4 mask_coord;\n"
2586 "varying vec2 tex_m;\n"
2587 "attribute vec2 tex_masksample;\n"
2588 "varying float maskdiv_s;\n"
2589 "varying vec2 masktex_s[2];\n"
2590 "void main()\n"
2591 "{\n"
2592 " gl_Position = mvp * vertex;\n"
2593 " col = color;\n"
2594 " tex_c = tex_coord;\n"
2595 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
2596 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
2597 " maskdiv_s = 2.0;\n"
2598 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
2599 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
2600 "}\n";
2601Evas_GL_Program_Source shader_img_bgra_mask12_vert_src =
2602{
2603 img_bgra_mask12_vert_glsl,
2604 NULL, 0
2605};
2606
2607static const char img_12_mask12_frag_glsl[] =
2608 "#ifdef GL_ES\n"
2609 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
2610 "precision highp float;\n"
2611 "#else\n"
2612 "precision mediump float;\n"
2613 "#endif\n"
2614 "#endif\n"
2615 "varying vec4 col;\n"
2616 "uniform sampler2D tex;\n"
2617 "varying vec2 tex_c;\n"
2618 "varying vec4 div_s;\n"
2619 "varying vec2 tex_s[2];\n"
2620 "uniform sampler2D texm;\n"
2621 "varying vec2 tex_m;\n"
2622 "varying float maskdiv_s;\n"
2623 "varying vec2 masktex_s[2];\n"
2624 "void main()\n"
2625 "{\n"
2626 " vec4 c;\n"
2627 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).gbar;\n"
2628 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).gbar;\n"
2629 " c = (col00 + col01) / div_s;\n"
2630 " float ma;\n"
2631 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
2632 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
2633 " ma = (ma00 + ma01) / maskdiv_s;\n"
2634 " gl_FragColor =\n"
2635 " c\n"
2636 " * col\n"
2637 " * ma\n"
2638 " ;\n"
2639 "}\n";
2640Evas_GL_Program_Source shader_img_12_mask12_frag_src =
2641{
2642 img_12_mask12_frag_glsl,
2643 NULL, 0
2644};
2645
2646static const char img_12_mask12_vert_glsl[] =
2647 "#ifdef GL_ES\n"
2648 "precision highp float;\n"
2649 "#endif\n"
2650 "attribute vec4 vertex;\n"
2651 "uniform mat4 mvp;\n"
2652 "attribute vec4 color;\n"
2653 "varying vec4 col;\n"
2654 "attribute vec2 tex_coord;\n"
2655 "varying vec2 tex_c;\n"
2656 "attribute vec2 tex_sample;\n"
2657 "varying vec4 div_s;\n"
2658 "varying vec2 tex_s[2];\n"
2659 "attribute vec4 mask_coord;\n"
2660 "varying vec2 tex_m;\n"
2661 "attribute vec2 tex_masksample;\n"
2662 "varying float maskdiv_s;\n"
2663 "varying vec2 masktex_s[2];\n"
2664 "void main()\n"
2665 "{\n"
2666 " gl_Position = mvp * vertex;\n"
2667 " col = color;\n"
2668 " tex_c = tex_coord;\n"
2669 " tex_s[0] = vec2(0, -tex_sample.y);\n"
2670 " tex_s[1] = vec2(0, tex_sample.y);\n"
2671 " div_s = vec4(2, 2, 2, 2);\n"
2672 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
2673 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
2674 " maskdiv_s = 2.0;\n"
2675 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
2676 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
2677 "}\n";
2678Evas_GL_Program_Source shader_img_12_mask12_vert_src =
2679{
2680 img_12_mask12_vert_glsl,
2681 NULL, 0
2682};
2683
2684static const char img_21_mask12_frag_glsl[] =
2685 "#ifdef GL_ES\n"
2686 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
2687 "precision highp float;\n"
2688 "#else\n"
2689 "precision mediump float;\n"
2690 "#endif\n"
2691 "#endif\n"
2692 "varying vec4 col;\n"
2693 "uniform sampler2D tex;\n"
2694 "varying vec2 tex_c;\n"
2695 "varying vec4 div_s;\n"
2696 "varying vec2 tex_s[2];\n"
2697 "uniform sampler2D texm;\n"
2698 "varying vec2 tex_m;\n"
2699 "varying float maskdiv_s;\n"
2700 "varying vec2 masktex_s[2];\n"
2701 "void main()\n"
2702 "{\n"
2703 " vec4 c;\n"
2704 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).gbar;\n"
2705 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).gbar;\n"
2706 " c = (col00 + col01) / div_s;\n"
2707 " float ma;\n"
2708 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
2709 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
2710 " ma = (ma00 + ma01) / maskdiv_s;\n"
2711 " gl_FragColor =\n"
2712 " c\n"
2713 " * col\n"
2714 " * ma\n"
2715 " ;\n"
2716 "}\n";
2717Evas_GL_Program_Source shader_img_21_mask12_frag_src =
2718{
2719 img_21_mask12_frag_glsl,
2720 NULL, 0
2721};
2722
2723static const char img_21_mask12_vert_glsl[] =
2724 "#ifdef GL_ES\n"
2725 "precision highp float;\n"
2726 "#endif\n"
2727 "attribute vec4 vertex;\n"
2728 "uniform mat4 mvp;\n"
2729 "attribute vec4 color;\n"
2730 "varying vec4 col;\n"
2731 "attribute vec2 tex_coord;\n"
2732 "varying vec2 tex_c;\n"
2733 "attribute vec2 tex_sample;\n"
2734 "varying vec4 div_s;\n"
2735 "varying vec2 tex_s[2];\n"
2736 "attribute vec4 mask_coord;\n"
2737 "varying vec2 tex_m;\n"
2738 "attribute vec2 tex_masksample;\n"
2739 "varying float maskdiv_s;\n"
2740 "varying vec2 masktex_s[2];\n"
2741 "void main()\n"
2742 "{\n"
2743 " gl_Position = mvp * vertex;\n"
2744 " col = color;\n"
2745 " tex_c = tex_coord;\n"
2746 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
2747 " tex_s[1] = vec2( tex_sample.x, 0);\n"
2748 " div_s = vec4(2, 2, 2, 2);\n"
2749 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
2750 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
2751 " maskdiv_s = 2.0;\n"
2752 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
2753 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
2754 "}\n";
2755Evas_GL_Program_Source shader_img_21_mask12_vert_src =
2756{
2757 img_21_mask12_vert_glsl,
2758 NULL, 0
2759};
2760
2761static const char img_22_mask12_frag_glsl[] =
2762 "#ifdef GL_ES\n"
2763 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
2764 "precision highp float;\n"
2765 "#else\n"
2766 "precision mediump float;\n"
2767 "#endif\n"
2768 "#endif\n"
2769 "varying vec4 col;\n"
2770 "uniform sampler2D tex;\n"
2771 "varying vec2 tex_c;\n"
2772 "varying vec4 div_s;\n"
2773 "varying vec2 tex_s[4];\n"
2774 "uniform sampler2D texm;\n"
2775 "varying vec2 tex_m;\n"
2776 "varying float maskdiv_s;\n"
2777 "varying vec2 masktex_s[2];\n"
2778 "void main()\n"
2779 "{\n"
2780 " vec4 c;\n"
2781 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).gbar;\n"
2782 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).gbar;\n"
2783 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).gbar;\n"
2784 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).gbar;\n"
2785 " c = (col00 + col01 + col10 + col11) / div_s;\n"
2786 " float ma;\n"
2787 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
2788 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
2789 " ma = (ma00 + ma01) / maskdiv_s;\n"
2790 " gl_FragColor =\n"
2791 " c\n"
2792 " * col\n"
2793 " * ma\n"
2794 " ;\n"
2795 "}\n";
2796Evas_GL_Program_Source shader_img_22_mask12_frag_src =
2797{
2798 img_22_mask12_frag_glsl,
2799 NULL, 0
2800};
2801
2802static const char img_22_mask12_vert_glsl[] =
2803 "#ifdef GL_ES\n"
2804 "precision highp float;\n"
2805 "#endif\n"
2806 "attribute vec4 vertex;\n"
2807 "uniform mat4 mvp;\n"
2808 "attribute vec4 color;\n"
2809 "varying vec4 col;\n"
2810 "attribute vec2 tex_coord;\n"
2811 "varying vec2 tex_c;\n"
2812 "attribute vec2 tex_sample;\n"
2813 "varying vec4 div_s;\n"
2814 "varying vec2 tex_s[4];\n"
2815 "attribute vec4 mask_coord;\n"
2816 "varying vec2 tex_m;\n"
2817 "attribute vec2 tex_masksample;\n"
2818 "varying float maskdiv_s;\n"
2819 "varying vec2 masktex_s[2];\n"
2820 "void main()\n"
2821 "{\n"
2822 " gl_Position = mvp * vertex;\n"
2823 " col = color;\n"
2824 " tex_c = tex_coord;\n"
2825 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
2826 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
2827 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
2828 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
2829 " div_s = vec4(4, 4, 4, 4);\n"
2830 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
2831 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
2832 " maskdiv_s = 2.0;\n"
2833 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
2834 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
2835 "}\n";
2836Evas_GL_Program_Source shader_img_22_mask12_vert_src =
2837{
2838 img_22_mask12_vert_glsl,
2839 NULL, 0
2840};
2841
2842static const char img_12_bgra_mask12_frag_glsl[] =
2843 "#ifdef GL_ES\n"
2844 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
2845 "precision highp float;\n"
2846 "#else\n"
2847 "precision mediump float;\n"
2848 "#endif\n"
2849 "#endif\n"
2850 "varying vec4 col;\n"
2851 "uniform sampler2D tex;\n"
2852 "varying vec2 tex_c;\n"
2853 "varying vec4 div_s;\n"
2854 "varying vec2 tex_s[2];\n"
2855 "uniform sampler2D texm;\n"
2856 "varying vec2 tex_m;\n"
2857 "varying float maskdiv_s;\n"
2858 "varying vec2 masktex_s[2];\n"
2859 "void main()\n"
2860 "{\n"
2861 " vec4 c;\n"
2862 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).grab;\n"
2863 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).grab;\n"
2864 " c = (col00 + col01) / div_s;\n"
2865 " float ma;\n"
2866 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
2867 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
2868 " ma = (ma00 + ma01) / maskdiv_s;\n"
2869 " gl_FragColor =\n"
2870 " c\n"
2871 " * col\n"
2872 " * ma\n"
2873 " ;\n"
2874 "}\n";
2875Evas_GL_Program_Source shader_img_12_bgra_mask12_frag_src =
2876{
2877 img_12_bgra_mask12_frag_glsl,
2878 NULL, 0
2879};
2880
2881static const char img_12_bgra_mask12_vert_glsl[] =
2882 "#ifdef GL_ES\n"
2883 "precision highp float;\n"
2884 "#endif\n"
2885 "attribute vec4 vertex;\n"
2886 "uniform mat4 mvp;\n"
2887 "attribute vec4 color;\n"
2888 "varying vec4 col;\n"
2889 "attribute vec2 tex_coord;\n"
2890 "varying vec2 tex_c;\n"
2891 "attribute vec2 tex_sample;\n"
2892 "varying vec4 div_s;\n"
2893 "varying vec2 tex_s[2];\n"
2894 "attribute vec4 mask_coord;\n"
2895 "varying vec2 tex_m;\n"
2896 "attribute vec2 tex_masksample;\n"
2897 "varying float maskdiv_s;\n"
2898 "varying vec2 masktex_s[2];\n"
2899 "void main()\n"
2900 "{\n"
2901 " gl_Position = mvp * vertex;\n"
2902 " col = color;\n"
2903 " tex_c = tex_coord;\n"
2904 " tex_s[0] = vec2(0, -tex_sample.y);\n"
2905 " tex_s[1] = vec2(0, tex_sample.y);\n"
2906 " div_s = vec4(2, 2, 2, 2);\n"
2907 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
2908 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
2909 " maskdiv_s = 2.0;\n"
2910 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
2911 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
2912 "}\n";
2913Evas_GL_Program_Source shader_img_12_bgra_mask12_vert_src =
2914{
2915 img_12_bgra_mask12_vert_glsl,
2916 NULL, 0
2917};
2918
2919static const char img_21_bgra_mask12_frag_glsl[] =
2920 "#ifdef GL_ES\n"
2921 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
2922 "precision highp float;\n"
2923 "#else\n"
2924 "precision mediump float;\n"
2925 "#endif\n"
2926 "#endif\n"
2927 "varying vec4 col;\n"
2928 "uniform sampler2D tex;\n"
2929 "varying vec2 tex_c;\n"
2930 "varying vec4 div_s;\n"
2931 "varying vec2 tex_s[2];\n"
2932 "uniform sampler2D texm;\n"
2933 "varying vec2 tex_m;\n"
2934 "varying float maskdiv_s;\n"
2935 "varying vec2 masktex_s[2];\n"
2936 "void main()\n"
2937 "{\n"
2938 " vec4 c;\n"
2939 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).grab;\n"
2940 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).grab;\n"
2941 " c = (col00 + col01) / div_s;\n"
2942 " float ma;\n"
2943 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
2944 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
2945 " ma = (ma00 + ma01) / maskdiv_s;\n"
2946 " gl_FragColor =\n"
2947 " c\n"
2948 " * col\n"
2949 " * ma\n"
2950 " ;\n"
2951 "}\n";
2952Evas_GL_Program_Source shader_img_21_bgra_mask12_frag_src =
2953{
2954 img_21_bgra_mask12_frag_glsl,
2955 NULL, 0
2956};
2957
2958static const char img_21_bgra_mask12_vert_glsl[] =
2959 "#ifdef GL_ES\n"
2960 "precision highp float;\n"
2961 "#endif\n"
2962 "attribute vec4 vertex;\n"
2963 "uniform mat4 mvp;\n"
2964 "attribute vec4 color;\n"
2965 "varying vec4 col;\n"
2966 "attribute vec2 tex_coord;\n"
2967 "varying vec2 tex_c;\n"
2968 "attribute vec2 tex_sample;\n"
2969 "varying vec4 div_s;\n"
2970 "varying vec2 tex_s[2];\n"
2971 "attribute vec4 mask_coord;\n"
2972 "varying vec2 tex_m;\n"
2973 "attribute vec2 tex_masksample;\n"
2974 "varying float maskdiv_s;\n"
2975 "varying vec2 masktex_s[2];\n"
2976 "void main()\n"
2977 "{\n"
2978 " gl_Position = mvp * vertex;\n"
2979 " col = color;\n"
2980 " tex_c = tex_coord;\n"
2981 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
2982 " tex_s[1] = vec2( tex_sample.x, 0);\n"
2983 " div_s = vec4(2, 2, 2, 2);\n"
2984 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
2985 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
2986 " maskdiv_s = 2.0;\n"
2987 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
2988 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
2989 "}\n";
2990Evas_GL_Program_Source shader_img_21_bgra_mask12_vert_src =
2991{
2992 img_21_bgra_mask12_vert_glsl,
2993 NULL, 0
2994};
2995
2996static const char img_22_bgra_mask12_frag_glsl[] =
2997 "#ifdef GL_ES\n"
2998 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
2999 "precision highp float;\n"
3000 "#else\n"
3001 "precision mediump float;\n"
3002 "#endif\n"
3003 "#endif\n"
3004 "varying vec4 col;\n"
3005 "uniform sampler2D tex;\n"
3006 "varying vec2 tex_c;\n"
3007 "varying vec4 div_s;\n"
3008 "varying vec2 tex_s[4];\n"
3009 "uniform sampler2D texm;\n"
3010 "varying vec2 tex_m;\n"
3011 "varying float maskdiv_s;\n"
3012 "varying vec2 masktex_s[2];\n"
3013 "void main()\n"
3014 "{\n"
3015 " vec4 c;\n"
3016 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).grab;\n"
3017 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).grab;\n"
3018 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).grab;\n"
3019 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).grab;\n"
3020 " c = (col00 + col01 + col10 + col11) / div_s;\n"
3021 " float ma;\n"
3022 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
3023 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
3024 " ma = (ma00 + ma01) / maskdiv_s;\n"
3025 " gl_FragColor =\n"
3026 " c\n"
3027 " * col\n"
3028 " * ma\n"
3029 " ;\n"
3030 "}\n";
3031Evas_GL_Program_Source shader_img_22_bgra_mask12_frag_src =
3032{
3033 img_22_bgra_mask12_frag_glsl,
3034 NULL, 0
3035};
3036
3037static const char img_22_bgra_mask12_vert_glsl[] =
3038 "#ifdef GL_ES\n"
3039 "precision highp float;\n"
3040 "#endif\n"
3041 "attribute vec4 vertex;\n"
3042 "uniform mat4 mvp;\n"
3043 "attribute vec4 color;\n"
3044 "varying vec4 col;\n"
3045 "attribute vec2 tex_coord;\n"
3046 "varying vec2 tex_c;\n"
3047 "attribute vec2 tex_sample;\n"
3048 "varying vec4 div_s;\n"
3049 "varying vec2 tex_s[4];\n"
3050 "attribute vec4 mask_coord;\n"
3051 "varying vec2 tex_m;\n"
3052 "attribute vec2 tex_masksample;\n"
3053 "varying float maskdiv_s;\n"
3054 "varying vec2 masktex_s[2];\n"
3055 "void main()\n"
3056 "{\n"
3057 " gl_Position = mvp * vertex;\n"
3058 " col = color;\n"
3059 " tex_c = tex_coord;\n"
3060 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
3061 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
3062 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
3063 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
3064 " div_s = vec4(4, 4, 4, 4);\n"
3065 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
3066 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
3067 " maskdiv_s = 2.0;\n"
3068 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
3069 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
3070 "}\n";
3071Evas_GL_Program_Source shader_img_22_bgra_mask12_vert_src =
3072{
3073 img_22_bgra_mask12_vert_glsl,
3074 NULL, 0
3075};
3076
3077static const char img_mask12_nomul_frag_glsl[] =
3078 "#ifdef GL_ES\n"
3079 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3080 "precision highp float;\n"
3081 "#else\n"
3082 "precision mediump float;\n"
3083 "#endif\n"
3084 "#endif\n"
3085 "uniform sampler2D tex;\n"
3086 "varying vec2 tex_c;\n"
3087 "uniform sampler2D texm;\n"
3088 "varying vec2 tex_m;\n"
3089 "varying float maskdiv_s;\n"
3090 "varying vec2 masktex_s[2];\n"
3091 "void main()\n"
3092 "{\n"
3093 " vec4 c;\n"
3094 " c = texture2D(tex, tex_c).gbar;\n"
3095 " float ma;\n"
3096 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
3097 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
3098 " ma = (ma00 + ma01) / maskdiv_s;\n"
3099 " gl_FragColor =\n"
3100 " c\n"
3101 " * ma\n"
3102 " ;\n"
3103 "}\n";
3104Evas_GL_Program_Source shader_img_mask12_nomul_frag_src =
3105{
3106 img_mask12_nomul_frag_glsl,
3107 NULL, 0
3108};
3109
3110static const char img_mask12_nomul_vert_glsl[] =
3111 "#ifdef GL_ES\n"
3112 "precision highp float;\n"
3113 "#endif\n"
3114 "attribute vec4 vertex;\n"
3115 "uniform mat4 mvp;\n"
3116 "attribute vec2 tex_coord;\n"
3117 "varying vec2 tex_c;\n"
3118 "attribute vec4 mask_coord;\n"
3119 "varying vec2 tex_m;\n"
3120 "attribute vec2 tex_masksample;\n"
3121 "varying float maskdiv_s;\n"
3122 "varying vec2 masktex_s[2];\n"
3123 "void main()\n"
3124 "{\n"
3125 " gl_Position = mvp * vertex;\n"
3126 " tex_c = tex_coord;\n"
3127 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
3128 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
3129 " maskdiv_s = 2.0;\n"
3130 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
3131 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
3132 "}\n";
3133Evas_GL_Program_Source shader_img_mask12_nomul_vert_src =
3134{
3135 img_mask12_nomul_vert_glsl,
3136 NULL, 0
3137};
3138
3139static const char img_bgra_mask12_nomul_frag_glsl[] =
3140 "#ifdef GL_ES\n"
3141 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3142 "precision highp float;\n"
3143 "#else\n"
3144 "precision mediump float;\n"
3145 "#endif\n"
3146 "#endif\n"
3147 "uniform sampler2D tex;\n"
3148 "varying vec2 tex_c;\n"
3149 "uniform sampler2D texm;\n"
3150 "varying vec2 tex_m;\n"
3151 "varying float maskdiv_s;\n"
3152 "varying vec2 masktex_s[2];\n"
3153 "void main()\n"
3154 "{\n"
3155 " vec4 c;\n"
3156 " c = texture2D(tex, tex_c).grab;\n"
3157 " float ma;\n"
3158 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
3159 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
3160 " ma = (ma00 + ma01) / maskdiv_s;\n"
3161 " gl_FragColor =\n"
3162 " c\n"
3163 " * ma\n"
3164 " ;\n"
3165 "}\n";
3166Evas_GL_Program_Source shader_img_bgra_mask12_nomul_frag_src =
3167{
3168 img_bgra_mask12_nomul_frag_glsl,
3169 NULL, 0
3170};
3171
3172static const char img_bgra_mask12_nomul_vert_glsl[] =
3173 "#ifdef GL_ES\n"
3174 "precision highp float;\n"
3175 "#endif\n"
3176 "attribute vec4 vertex;\n"
3177 "uniform mat4 mvp;\n"
3178 "attribute vec2 tex_coord;\n"
3179 "varying vec2 tex_c;\n"
3180 "attribute vec4 mask_coord;\n"
3181 "varying vec2 tex_m;\n"
3182 "attribute vec2 tex_masksample;\n"
3183 "varying float maskdiv_s;\n"
3184 "varying vec2 masktex_s[2];\n"
3185 "void main()\n"
3186 "{\n"
3187 " gl_Position = mvp * vertex;\n"
3188 " tex_c = tex_coord;\n"
3189 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
3190 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
3191 " maskdiv_s = 2.0;\n"
3192 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
3193 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
3194 "}\n";
3195Evas_GL_Program_Source shader_img_bgra_mask12_nomul_vert_src =
3196{
3197 img_bgra_mask12_nomul_vert_glsl,
3198 NULL, 0
3199};
3200
3201static const char img_12_mask12_nomul_frag_glsl[] =
3202 "#ifdef GL_ES\n"
3203 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3204 "precision highp float;\n"
3205 "#else\n"
3206 "precision mediump float;\n"
3207 "#endif\n"
3208 "#endif\n"
3209 "uniform sampler2D tex;\n"
3210 "varying vec2 tex_c;\n"
3211 "varying vec4 div_s;\n"
3212 "varying vec2 tex_s[2];\n"
3213 "uniform sampler2D texm;\n"
3214 "varying vec2 tex_m;\n"
3215 "varying float maskdiv_s;\n"
3216 "varying vec2 masktex_s[2];\n"
3217 "void main()\n"
3218 "{\n"
3219 " vec4 c;\n"
3220 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).gbar;\n"
3221 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).gbar;\n"
3222 " c = (col00 + col01) / div_s;\n"
3223 " float ma;\n"
3224 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
3225 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
3226 " ma = (ma00 + ma01) / maskdiv_s;\n"
3227 " gl_FragColor =\n"
3228 " c\n"
3229 " * ma\n"
3230 " ;\n"
3231 "}\n";
3232Evas_GL_Program_Source shader_img_12_mask12_nomul_frag_src =
3233{
3234 img_12_mask12_nomul_frag_glsl,
3235 NULL, 0
3236};
3237
3238static const char img_12_mask12_nomul_vert_glsl[] =
3239 "#ifdef GL_ES\n"
3240 "precision highp float;\n"
3241 "#endif\n"
3242 "attribute vec4 vertex;\n"
3243 "uniform mat4 mvp;\n"
3244 "attribute vec2 tex_coord;\n"
3245 "varying vec2 tex_c;\n"
3246 "attribute vec2 tex_sample;\n"
3247 "varying vec4 div_s;\n"
3248 "varying vec2 tex_s[2];\n"
3249 "attribute vec4 mask_coord;\n"
3250 "varying vec2 tex_m;\n"
3251 "attribute vec2 tex_masksample;\n"
3252 "varying float maskdiv_s;\n"
3253 "varying vec2 masktex_s[2];\n"
3254 "void main()\n"
3255 "{\n"
3256 " gl_Position = mvp * vertex;\n"
3257 " tex_c = tex_coord;\n"
3258 " tex_s[0] = vec2(0, -tex_sample.y);\n"
3259 " tex_s[1] = vec2(0, tex_sample.y);\n"
3260 " div_s = vec4(2, 2, 2, 2);\n"
3261 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
3262 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
3263 " maskdiv_s = 2.0;\n"
3264 " vec4 mask_Position = mvp * vertex * vec4(0.5, sign(mask_coord.w) * 0.5, 0.5, 0.5) + vec4(0.5, 0.5, 0, 0);\n"
3265 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
3266 "}\n";
3267Evas_GL_Program_Source shader_img_12_mask12_nomul_vert_src =
3268{
3269 img_12_mask12_nomul_vert_glsl,
3270 NULL, 0
3271};
3272
3273static const char img_21_mask12_nomul_frag_glsl[] =
3274 "#ifdef GL_ES\n"
3275 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
3276 "precision highp float;\n"
3277 "#else\n"
3278 "precision mediump float;\n"
3279 "#endif\n"