summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-10-18 18:45:11 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-10-18 18:45:11 +0900
commit548addbb02721b0d935b898a287836981a2a84f4 (patch)
tree526f6a96c3ebccae7b8c412f71d629adac587640 /src
parentb70f02a652dafb808627f69cf5ed4a0c9da903c8 (diff)
evas gl - fix big endian fully by adding a host of new img shaders
no shortcuts. we used the same img sharder for pixles as for native surf. so need new shaders to do the swiszzling. add them all, generation scripts metadata and enums etc. @fix (along with previous 3 commits)
Diffstat (limited to 'src')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_common.h3
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_context.c14
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_shader.c36
-rw-r--r--src/modules/evas/engines/gl_common/shader/evas_gl_enum.x224
-rw-r--r--src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x6416
-rw-r--r--src/modules/evas/engines/gl_common/shader/evas_gl_shaders_bigendian.x6418
-rwxr-xr-xsrc/modules/evas/engines/gl_common/shader/gen_shaders.sh1
-rw-r--r--src/modules/evas/engines/gl_common/shader/shaders.txt118
8 files changed, 13210 insertions, 20 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h b/src/modules/evas/engines/gl_common/evas_gl_common.h
index fbce014..592f975 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_common.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_common.h
@@ -222,6 +222,7 @@ enum _Shader_Type {
222 SHD_RECT, 222 SHD_RECT,
223 SHD_FONT, 223 SHD_FONT,
224 SHD_IMAGE, 224 SHD_IMAGE,
225 SHD_IMAGENATIVE,
225 SHD_YUV, 226 SHD_YUV,
226 SHD_YUY2, 227 SHD_YUY2,
227 SHD_NV12, 228 SHD_NV12,
@@ -603,7 +604,7 @@ void evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *g
603int evas_gl_common_shader_program_init(Evas_GL_Shared *shared); 604int evas_gl_common_shader_program_init(Evas_GL_Shared *shared);
604void evas_gl_common_shader_program_init_done(void); 605void evas_gl_common_shader_program_init_done(void);
605void evas_gl_common_shader_program_shutdown(Evas_GL_Program *p); 606void evas_gl_common_shader_program_shutdown(Evas_GL_Program *p);
606Evas_GL_Shader evas_gl_common_img_shader_select(Shader_Sampling sam, int nomul, int afill, int bgra, int mask, int masksam); 607Evas_GL_Shader evas_gl_common_img_shader_select(Shader_Type type, Shader_Sampling sam, int nomul, int afill, int bgra, int mask, int masksam);
607const char *evas_gl_common_shader_name_get(Evas_GL_Shader shd); 608const char *evas_gl_common_shader_name_get(Evas_GL_Shader shd);
608 609
609Eina_Bool evas_gl_common_file_cache_is_dir(const char *file); 610Eina_Bool evas_gl_common_file_cache_is_dir(const char *file);
diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c
index 17becda..5e33fbe 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -1541,7 +1541,7 @@ evas_gl_common_shader_select(Evas_Engine_GL_Context *gc,
1541 } 1541 }
1542 1542
1543 // image downscale sampling 1543 // image downscale sampling
1544 if (smooth && (type == SHD_IMAGE)) 1544 if (smooth && ((type == SHD_IMAGE) || (type == SHD_IMAGENATIVE)))
1545 { 1545 {
1546 if ((sw >= (w * 2)) && (sh >= (h * 2))) 1546 if ((sw >= (w * 2)) && (sh >= (h * 2)))
1547 sam = SHD_SAM22; 1547 sam = SHD_SAM22;
@@ -1605,13 +1605,11 @@ evas_gl_common_shader_select(Evas_Engine_GL_Context *gc,
1605 { 1605 {
1606 if (tex->pt->dyn.img) 1606 if (tex->pt->dyn.img)
1607 { 1607 {
1608 printf("a... %i\n", (int)tex->alpha);
1609 afill = !tex->alpha; 1608 afill = !tex->alpha;
1610 bgra = 1; 1609 bgra = 1;
1611 } 1610 }
1612 else if (tex->im && tex->im->native.target == GL_TEXTURE_EXTERNAL_OES) 1611 else if (tex->im && tex->im->native.target == GL_TEXTURE_EXTERNAL_OES)
1613 { 1612 {
1614 printf("b... %i\n", (int)tex->alpha);
1615 type = SHD_TEX_EXTERNAL; 1613 type = SHD_TEX_EXTERNAL;
1616 afill = !tex->alpha; 1614 afill = !tex->alpha;
1617 } 1615 }
@@ -1621,8 +1619,8 @@ evas_gl_common_shader_select(Evas_Engine_GL_Context *gc,
1621 else 1619 else
1622 bgra = gc_bgra; 1620 bgra = gc_bgra;
1623 1621
1624 if ((type == SHD_IMAGE) || (type == SHD_MAP)) 1622 if ((type == SHD_IMAGE) || (type == SHD_IMAGENATIVE) || (type == SHD_MAP))
1625 shader = evas_gl_common_img_shader_select(sam, nomul, afill, bgra, mask, masksam); 1623 shader = evas_gl_common_img_shader_select(type, sam, nomul, afill, bgra, mask, masksam);
1626 else 1624 else
1627 { 1625 {
1628#define SHADERS(name, ...) \ 1626#define SHADERS(name, ...) \
@@ -2090,6 +2088,10 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
2090 int pn = 0, render_op = gc->dc->render_op, nomul = 0; 2088 int pn = 0, render_op = gc->dc->render_op, nomul = 0;
2091 Shader_Sampling sam = 0, masksam = 0; 2089 Shader_Sampling sam = 0, masksam = 0;
2092 int yinvert = 0; 2090 int yinvert = 0;
2091 Shader_Type shd_in = SHD_IMAGE;
2092
2093 if ((tex->im) && (tex->im->native.data))
2094 shd_in = SHD_IMAGENATIVE;
2093 2095
2094 if (!!mtex) 2096 if (!!mtex)
2095 { 2097 {
@@ -2100,7 +2102,7 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
2100 else if (!(render_op == EVAS_RENDER_COPY) && ((a < 255) || (tex->alpha))) 2102 else if (!(render_op == EVAS_RENDER_COPY) && ((a < 255) || (tex->alpha)))
2101 blend = EINA_TRUE; 2103 blend = EINA_TRUE;
2102 2104
2103 shader = evas_gl_common_shader_select(gc, SHD_IMAGE, NULL, 0, r, g, b, a, 2105 shader = evas_gl_common_shader_select(gc, shd_in, NULL, 0, r, g, b, a,
2104 sw, sh, w, h, smooth, tex, tex_only, 2106 sw, sh, w, h, smooth, tex, tex_only,
2105 mtex, mask_smooth, mw, mh, 2107 mtex, mask_smooth, mw, mh,
2106 &sam, &nomul, &masksam); 2108 &sam, &nomul, &masksam);
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 bbff64b..07bf314 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_shader.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_shader.c
@@ -357,16 +357,16 @@ evas_gl_common_shader_program_shutdown(Evas_GL_Program *p)
357} 357}
358 358
359Evas_GL_Shader 359Evas_GL_Shader
360evas_gl_common_img_shader_select(Shader_Sampling sam, int nomul, int afill, int bgra, int mask, int masksam) 360evas_gl_common_img_shader_select(Shader_Type type, Shader_Sampling sam, int nomul, int afill, int bgra, int mask, int masksam)
361{ 361{
362 // 256 combinaisons including many impossible 362 // 256 combinaisons including many impossible
363 static Evas_GL_Shader _shaders[4 * 2 * 2 * 2 * 2 * 4]; 363 static Evas_GL_Shader _shaders[4 * 2 * 2 * 2 * 2 * 4 * 2];
364 static Eina_Bool init = EINA_FALSE; 364 static Eina_Bool init = EINA_FALSE;
365 int idx; 365 int idx;
366 366
367 if (EINA_UNLIKELY(!init)) 367 if (EINA_UNLIKELY(!init))
368 { 368 {
369 unsigned k; 369 unsigned int k;
370 370
371 init = EINA_TRUE; 371 init = EINA_TRUE;
372 for (k = 0; k < (sizeof(_shaders) / sizeof(_shaders[0])); k++) 372 for (k = 0; k < (sizeof(_shaders) / sizeof(_shaders[0])); k++)
@@ -374,14 +374,27 @@ evas_gl_common_img_shader_select(Shader_Sampling sam, int nomul, int afill, int
374 374
375 for (k = 0; k < (sizeof(_shaders_source) / sizeof(_shaders_source[0])); k++) 375 for (k = 0; k < (sizeof(_shaders_source) / sizeof(_shaders_source[0])); k++)
376 { 376 {
377 if (_shaders_source[k].type != SHD_IMAGE) continue; 377 if (_shaders_source[k].type == SHD_IMAGE)
378 idx = _shaders_source[k].sam << 6; // 2 bits 378 {
379 idx |= _shaders_source[k].masksam << 4; // 2 bits 379 idx = _shaders_source[k].sam << 6; // 2 bits
380 idx |= _shaders_source[k].bgra << 3; // bool 380 idx |= _shaders_source[k].masksam << 4; // 2 bits
381 idx |= _shaders_source[k].mask << 2; // bool 381 idx |= _shaders_source[k].bgra << 3; // bool
382 idx |= _shaders_source[k].nomul << 1; // bool 382 idx |= _shaders_source[k].mask << 2; // bool
383 idx |= _shaders_source[k].afill; // bool 383 idx |= _shaders_source[k].nomul << 1; // bool
384 _shaders[idx] = _shaders_source[k].id; 384 idx |= _shaders_source[k].afill; // bool
385 _shaders[idx] = _shaders_source[k].id;
386 }
387 else if (_shaders_source[k].type == SHD_IMAGENATIVE)
388 {
389 idx = _shaders_source[k].sam << 6; // 2 bits
390 idx |= _shaders_source[k].masksam << 4; // 2 bits
391 idx |= _shaders_source[k].bgra << 3; // bool
392 idx |= _shaders_source[k].mask << 2; // bool
393 idx |= _shaders_source[k].nomul << 1; // bool
394 idx |= _shaders_source[k].afill; // bool
395 idx += (4 * 2 * 2 * 2 * 2 * 4);
396 _shaders[idx] = _shaders_source[k].id;
397 }
385 } 398 }
386 } 399 }
387 400
@@ -391,6 +404,7 @@ evas_gl_common_img_shader_select(Shader_Sampling sam, int nomul, int afill, int
391 idx |= mask << 2; 404 idx |= mask << 2;
392 idx |= nomul << 1; 405 idx |= nomul << 1;
393 idx |= afill; 406 idx |= afill;
407 if (type == SHD_IMAGENATIVE) idx += (4 * 2 * 2 * 2 * 2 * 4);
394 return _shaders[idx]; 408 return _shaders[idx];
395} 409}
396 410
diff --git a/src/modules/evas/engines/gl_common/shader/evas_gl_enum.x b/src/modules/evas/engines/gl_common/shader/evas_gl_enum.x
index e747d00..41d372a 100644
--- a/src/modules/evas/engines/gl_common/shader/evas_gl_enum.x
+++ b/src/modules/evas/engines/gl_common/shader/evas_gl_enum.x
@@ -108,6 +108,102 @@ typedef enum {
108 SHADER_IMG_12_BGRA_NOMUL_AFILL, 108 SHADER_IMG_12_BGRA_NOMUL_AFILL,
109 SHADER_IMG_21_BGRA_NOMUL_AFILL, 109 SHADER_IMG_21_BGRA_NOMUL_AFILL,
110 SHADER_IMG_22_BGRA_NOMUL_AFILL, 110 SHADER_IMG_22_BGRA_NOMUL_AFILL,
111 SHADER_IMGNAT,
112 SHADER_IMGNAT_BGRA,
113 SHADER_IMGNAT_12,
114 SHADER_IMGNAT_21,
115 SHADER_IMGNAT_22,
116 SHADER_IMGNAT_12_BGRA,
117 SHADER_IMGNAT_21_BGRA,
118 SHADER_IMGNAT_22_BGRA,
119 SHADER_IMGNAT_MASK,
120 SHADER_IMGNAT_BGRA_MASK,
121 SHADER_IMGNAT_12_MASK,
122 SHADER_IMGNAT_21_MASK,
123 SHADER_IMGNAT_22_MASK,
124 SHADER_IMGNAT_12_BGRA_MASK,
125 SHADER_IMGNAT_21_BGRA_MASK,
126 SHADER_IMGNAT_22_BGRA_MASK,
127 SHADER_IMGNAT_NOMUL,
128 SHADER_IMGNAT_BGRA_NOMUL,
129 SHADER_IMGNAT_12_NOMUL,
130 SHADER_IMGNAT_21_NOMUL,
131 SHADER_IMGNAT_22_NOMUL,
132 SHADER_IMGNAT_12_BGRA_NOMUL,
133 SHADER_IMGNAT_21_BGRA_NOMUL,
134 SHADER_IMGNAT_22_BGRA_NOMUL,
135 SHADER_IMGNAT_MASK_NOMUL,
136 SHADER_IMGNAT_BGRA_MASK_NOMUL,
137 SHADER_IMGNAT_12_MASK_NOMUL,
138 SHADER_IMGNAT_21_MASK_NOMUL,
139 SHADER_IMGNAT_22_MASK_NOMUL,
140 SHADER_IMGNAT_12_BGRA_MASK_NOMUL,
141 SHADER_IMGNAT_21_BGRA_MASK_NOMUL,
142 SHADER_IMGNAT_22_BGRA_MASK_NOMUL,
143 SHADER_IMGNAT_MASK12,
144 SHADER_IMGNAT_BGRA_MASK12,
145 SHADER_IMGNAT_12_MASK12,
146 SHADER_IMGNAT_21_MASK12,
147 SHADER_IMGNAT_22_MASK12,
148 SHADER_IMGNAT_12_BGRA_MASK12,
149 SHADER_IMGNAT_21_BGRA_MASK12,
150 SHADER_IMGNAT_22_BGRA_MASK12,
151 SHADER_IMGNAT_MASK12_NOMUL,
152 SHADER_IMGNAT_BGRA_MASK12_NOMUL,
153 SHADER_IMGNAT_12_MASK12_NOMUL,
154 SHADER_IMGNAT_21_MASK12_NOMUL,
155 SHADER_IMGNAT_22_MASK12_NOMUL,
156 SHADER_IMGNAT_12_BGRA_MASK12_NOMUL,
157 SHADER_IMGNAT_21_BGRA_MASK12_NOMUL,
158 SHADER_IMGNAT_22_BGRA_MASK12_NOMUL,
159 SHADER_IMGNAT_MASK21,
160 SHADER_IMGNAT_BGRA_MASK21,
161 SHADER_IMGNAT_12_MASK21,
162 SHADER_IMGNAT_21_MASK21,
163 SHADER_IMGNAT_22_MASK21,
164 SHADER_IMGNAT_12_BGRA_MASK21,
165 SHADER_IMGNAT_21_BGRA_MASK21,
166 SHADER_IMGNAT_22_BGRA_MASK21,
167 SHADER_IMGNAT_MASK21_NOMUL,
168 SHADER_IMGNAT_BGRA_MASK21_NOMUL,
169 SHADER_IMGNAT_12_MASK21_NOMUL,
170 SHADER_IMGNAT_21_MASK21_NOMUL,
171 SHADER_IMGNAT_22_MASK21_NOMUL,
172 SHADER_IMGNAT_12_BGRA_MASK21_NOMUL,
173 SHADER_IMGNAT_21_BGRA_MASK21_NOMUL,
174 SHADER_IMGNAT_22_BGRA_MASK21_NOMUL,
175 SHADER_IMGNAT_MASK22,
176 SHADER_IMGNAT_BGRA_MASK22,
177 SHADER_IMGNAT_12_MASK22,
178 SHADER_IMGNAT_21_MASK22,
179 SHADER_IMGNAT_22_MASK22,
180 SHADER_IMGNAT_12_BGRA_MASK22,
181 SHADER_IMGNAT_21_BGRA_MASK22,
182 SHADER_IMGNAT_22_BGRA_MASK22,
183 SHADER_IMGNAT_MASK22_NOMUL,
184 SHADER_IMGNAT_BGRA_MASK22_NOMUL,
185 SHADER_IMGNAT_12_MASK22_NOMUL,
186 SHADER_IMGNAT_21_MASK22_NOMUL,
187 SHADER_IMGNAT_22_MASK22_NOMUL,
188 SHADER_IMGNAT_12_BGRA_MASK22_NOMUL,
189 SHADER_IMGNAT_21_BGRA_MASK22_NOMUL,
190 SHADER_IMGNAT_22_BGRA_MASK22_NOMUL,
191 SHADER_IMGNAT_AFILL,
192 SHADER_IMGNAT_BGRA_AFILL,
193 SHADER_IMGNAT_NOMUL_AFILL,
194 SHADER_IMGNAT_BGRA_NOMUL_AFILL,
195 SHADER_IMGNAT_12_AFILL,
196 SHADER_IMGNAT_21_AFILL,
197 SHADER_IMGNAT_22_AFILL,
198 SHADER_IMGNAT_12_BGRA_AFILL,
199 SHADER_IMGNAT_21_BGRA_AFILL,
200 SHADER_IMGNAT_22_BGRA_AFILL,
201 SHADER_IMGNAT_12_NOMUL_AFILL,
202 SHADER_IMGNAT_21_NOMUL_AFILL,
203 SHADER_IMGNAT_22_NOMUL_AFILL,
204 SHADER_IMGNAT_12_BGRA_NOMUL_AFILL,
205 SHADER_IMGNAT_21_BGRA_NOMUL_AFILL,
206 SHADER_IMGNAT_22_BGRA_NOMUL_AFILL,
111 SHADER_RGB_A_PAIR, 207 SHADER_RGB_A_PAIR,
112 SHADER_RGB_A_PAIR_MASK, 208 SHADER_RGB_A_PAIR_MASK,
113 SHADER_RGB_A_PAIR_NOMUL, 209 SHADER_RGB_A_PAIR_NOMUL,
@@ -287,6 +383,134 @@ static struct {
287 { SHADER_IMG_21_BGRA_MASK22_NOMUL, "texm" }, 383 { SHADER_IMG_21_BGRA_MASK22_NOMUL, "texm" },
288 { SHADER_IMG_22_BGRA_MASK22_NOMUL, "tex" }, 384 { SHADER_IMG_22_BGRA_MASK22_NOMUL, "tex" },
289 { SHADER_IMG_22_BGRA_MASK22_NOMUL, "texm" }, 385 { SHADER_IMG_22_BGRA_MASK22_NOMUL, "texm" },
386 { SHADER_IMGNAT_MASK, "tex" },
387 { SHADER_IMGNAT_MASK, "texm" },
388 { SHADER_IMGNAT_BGRA_MASK, "tex" },
389 { SHADER_IMGNAT_BGRA_MASK, "texm" },
390 { SHADER_IMGNAT_12_MASK, "tex" },
391 { SHADER_IMGNAT_12_MASK, "texm" },
392 { SHADER_IMGNAT_21_MASK, "tex" },
393 { SHADER_IMGNAT_21_MASK, "texm" },
394 { SHADER_IMGNAT_22_MASK, "tex" },
395 { SHADER_IMGNAT_22_MASK, "texm" },
396 { SHADER_IMGNAT_12_BGRA_MASK, "tex" },
397 { SHADER_IMGNAT_12_BGRA_MASK, "texm" },
398 { SHADER_IMGNAT_21_BGRA_MASK, "tex" },
399 { SHADER_IMGNAT_21_BGRA_MASK, "texm" },
400 { SHADER_IMGNAT_22_BGRA_MASK, "tex" },
401 { SHADER_IMGNAT_22_BGRA_MASK, "texm" },
402 { SHADER_IMGNAT_MASK_NOMUL, "tex" },
403 { SHADER_IMGNAT_MASK_NOMUL, "texm" },
404 { SHADER_IMGNAT_BGRA_MASK_NOMUL, "tex" },
405 { SHADER_IMGNAT_BGRA_MASK_NOMUL, "texm" },
406 { SHADER_IMGNAT_12_MASK_NOMUL, "tex" },
407 { SHADER_IMGNAT_12_MASK_NOMUL, "texm" },
408 { SHADER_IMGNAT_21_MASK_NOMUL, "tex" },
409 { SHADER_IMGNAT_21_MASK_NOMUL, "texm" },
410 { SHADER_IMGNAT_22_MASK_NOMUL, "tex" },
411 { SHADER_IMGNAT_22_MASK_NOMUL, "texm" },
412 { SHADER_IMGNAT_12_BGRA_MASK_NOMUL, "tex" },
413 { SHADER_IMGNAT_12_BGRA_MASK_NOMUL, "texm" },
414 { SHADER_IMGNAT_21_BGRA_MASK_NOMUL, "tex" },
415 { SHADER_IMGNAT_21_BGRA_MASK_NOMUL, "texm" },
416 { SHADER_IMGNAT_22_BGRA_MASK_NOMUL, "tex" },
417 { SHADER_IMGNAT_22_BGRA_MASK_NOMUL, "texm" },
418 { SHADER_IMGNAT_MASK12, "tex" },
419 { SHADER_IMGNAT_MASK12, "texm" },
420 { SHADER_IMGNAT_BGRA_MASK12, "tex" },
421 { SHADER_IMGNAT_BGRA_MASK12, "texm" },
422 { SHADER_IMGNAT_12_MASK12, "tex" },
423 { SHADER_IMGNAT_12_MASK12, "texm" },
424 { SHADER_IMGNAT_21_MASK12, "tex" },
425 { SHADER_IMGNAT_21_MASK12, "texm" },
426 { SHADER_IMGNAT_22_MASK12, "tex" },
427 { SHADER_IMGNAT_22_MASK12, "texm" },
428 { SHADER_IMGNAT_12_BGRA_MASK12, "tex" },
429 { SHADER_IMGNAT_12_BGRA_MASK12, "texm" },
430 { SHADER_IMGNAT_21_BGRA_MASK12, "tex" },
431 { SHADER_IMGNAT_21_BGRA_MASK12, "texm" },
432 { SHADER_IMGNAT_22_BGRA_MASK12, "tex" },
433 { SHADER_IMGNAT_22_BGRA_MASK12, "texm" },
434 { SHADER_IMGNAT_MASK12_NOMUL, "tex" },
435 { SHADER_IMGNAT_MASK12_NOMUL, "texm" },
436 { SHADER_IMGNAT_BGRA_MASK12_NOMUL, "tex" },
437 { SHADER_IMGNAT_BGRA_MASK12_NOMUL, "texm" },
438 { SHADER_IMGNAT_12_MASK12_NOMUL, "tex" },
439 { SHADER_IMGNAT_12_MASK12_NOMUL, "texm" },
440 { SHADER_IMGNAT_21_MASK12_NOMUL, "tex" },
441 { SHADER_IMGNAT_21_MASK12_NOMUL, "texm" },
442 { SHADER_IMGNAT_22_MASK12_NOMUL, "tex" },
443 { SHADER_IMGNAT_22_MASK12_NOMUL, "texm" },
444 { SHADER_IMGNAT_12_BGRA_MASK12_NOMUL, "tex" },
445 { SHADER_IMGNAT_12_BGRA_MASK12_NOMUL, "texm" },
446 { SHADER_IMGNAT_21_BGRA_MASK12_NOMUL, "tex" },
447 { SHADER_IMGNAT_21_BGRA_MASK12_NOMUL, "texm" },
448 { SHADER_IMGNAT_22_BGRA_MASK12_NOMUL, "tex" },
449 { SHADER_IMGNAT_22_BGRA_MASK12_NOMUL, "texm" },
450 { SHADER_IMGNAT_MASK21, "tex" },
451 { SHADER_IMGNAT_MASK21, "texm" },
452 { SHADER_IMGNAT_BGRA_MASK21, "tex" },
453 { SHADER_IMGNAT_BGRA_MASK21, "texm" },
454 { SHADER_IMGNAT_12_MASK21, "tex" },
455 { SHADER_IMGNAT_12_MASK21, "texm" },
456 { SHADER_IMGNAT_21_MASK21, "tex" },
457 { SHADER_IMGNAT_21_MASK21, "texm" },
458 { SHADER_IMGNAT_22_MASK21, "tex" },
459 { SHADER_IMGNAT_22_MASK21, "texm" },
460 { SHADER_IMGNAT_12_BGRA_MASK21, "tex" },
461 { SHADER_IMGNAT_12_BGRA_MASK21, "texm" },
462 { SHADER_IMGNAT_21_BGRA_MASK21, "tex" },
463 { SHADER_IMGNAT_21_BGRA_MASK21, "texm" },
464 { SHADER_IMGNAT_22_BGRA_MASK21, "tex" },
465 { SHADER_IMGNAT_22_BGRA_MASK21, "texm" },
466 { SHADER_IMGNAT_MASK21_NOMUL, "tex" },
467 { SHADER_IMGNAT_MASK21_NOMUL, "texm" },
468 { SHADER_IMGNAT_BGRA_MASK21_NOMUL, "tex" },
469 { SHADER_IMGNAT_BGRA_MASK21_NOMUL, "texm" },
470 { SHADER_IMGNAT_12_MASK21_NOMUL, "tex" },
471 { SHADER_IMGNAT_12_MASK21_NOMUL, "texm" },
472 { SHADER_IMGNAT_21_MASK21_NOMUL, "tex" },
473 { SHADER_IMGNAT_21_MASK21_NOMUL, "texm" },
474 { SHADER_IMGNAT_22_MASK21_NOMUL, "tex" },
475 { SHADER_IMGNAT_22_MASK21_NOMUL, "texm" },
476 { SHADER_IMGNAT_12_BGRA_MASK21_NOMUL, "tex" },
477 { SHADER_IMGNAT_12_BGRA_MASK21_NOMUL, "texm" },
478 { SHADER_IMGNAT_21_BGRA_MASK21_NOMUL, "tex" },
479 { SHADER_IMGNAT_21_BGRA_MASK21_NOMUL, "texm" },
480 { SHADER_IMGNAT_22_BGRA_MASK21_NOMUL, "tex" },
481 { SHADER_IMGNAT_22_BGRA_MASK21_NOMUL, "texm" },
482 { SHADER_IMGNAT_MASK22, "tex" },
483 { SHADER_IMGNAT_MASK22, "texm" },
484 { SHADER_IMGNAT_BGRA_MASK22, "tex" },
485 { SHADER_IMGNAT_BGRA_MASK22, "texm" },
486 { SHADER_IMGNAT_12_MASK22, "tex" },
487 { SHADER_IMGNAT_12_MASK22, "texm" },
488 { SHADER_IMGNAT_21_MASK22, "tex" },
489 { SHADER_IMGNAT_21_MASK22, "texm" },
490 { SHADER_IMGNAT_22_MASK22, "tex" },
491 { SHADER_IMGNAT_22_MASK22, "texm" },
492 { SHADER_IMGNAT_12_BGRA_MASK22, "tex" },
493 { SHADER_IMGNAT_12_BGRA_MASK22, "texm" },
494 { SHADER_IMGNAT_21_BGRA_MASK22, "tex" },
495 { SHADER_IMGNAT_21_BGRA_MASK22, "texm" },
496 { SHADER_IMGNAT_22_BGRA_MASK22, "tex" },
497 { SHADER_IMGNAT_22_BGRA_MASK22, "texm" },
498 { SHADER_IMGNAT_MASK22_NOMUL, "tex" },
499 { SHADER_IMGNAT_MASK22_NOMUL, "texm" },
500 { SHADER_IMGNAT_BGRA_MASK22_NOMUL, "tex" },
501 { SHADER_IMGNAT_BGRA_MASK22_NOMUL, "texm" },
502 { SHADER_IMGNAT_12_MASK22_NOMUL, "tex" },
503 { SHADER_IMGNAT_12_MASK22_NOMUL, "texm" },
504 { SHADER_IMGNAT_21_MASK22_NOMUL, "tex" },
505 { SHADER_IMGNAT_21_MASK22_NOMUL, "texm" },
506 { SHADER_IMGNAT_22_MASK22_NOMUL, "tex" },
507 { SHADER_IMGNAT_22_MASK22_NOMUL, "texm" },
508 { SHADER_IMGNAT_12_BGRA_MASK22_NOMUL, "tex" },
509 { SHADER_IMGNAT_12_BGRA_MASK22_NOMUL, "texm" },
510 { SHADER_IMGNAT_21_BGRA_MASK22_NOMUL, "tex" },
511 { SHADER_IMGNAT_21_BGRA_MASK22_NOMUL, "texm" },
512 { SHADER_IMGNAT_22_BGRA_MASK22_NOMUL, "tex" },
513 { SHADER_IMGNAT_22_BGRA_MASK22_NOMUL, "texm" },
290 { SHADER_RGB_A_PAIR, "tex" }, 514 { SHADER_RGB_A_PAIR, "tex" },
291 { SHADER_RGB_A_PAIR, "texa" }, 515 { SHADER_RGB_A_PAIR, "texa" },
292 { SHADER_RGB_A_PAIR_MASK, "tex" }, 516 { SHADER_RGB_A_PAIR_MASK, "tex" },
diff --git a/src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x b/src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x
index 871cca6..ae84689 100644
--- a/src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x
+++ b/src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x
@@ -6918,6 +6918,6326 @@ Evas_GL_Program_Source shader_img_22_bgra_nomul_afill_vert_src =
6918 NULL, 0 6918 NULL, 0
6919}; 6919};
6920 6920
6921static const char imgnat_frag_glsl[] =
6922 "#ifdef GL_ES\n"
6923 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
6924 "precision highp float;\n"
6925 "#else\n"
6926 "precision mediump float;\n"
6927 "#endif\n"
6928 "#endif\n"
6929 "varying vec4 col;\n"
6930 "uniform sampler2D tex;\n"
6931 "varying vec2 tex_c;\n"
6932 "void main()\n"
6933 "{\n"
6934 " vec4 c;\n"
6935 " c = texture2D(tex, tex_c).bgra;\n"
6936 " gl_FragColor =\n"
6937 " c\n"
6938 " * col\n"
6939 " ;\n"
6940 "}\n";
6941Evas_GL_Program_Source shader_imgnat_frag_src =
6942{
6943 imgnat_frag_glsl,
6944 NULL, 0
6945};
6946
6947static const char imgnat_vert_glsl[] =
6948 "#ifdef GL_ES\n"
6949 "precision highp float;\n"
6950 "#endif\n"
6951 "attribute vec4 vertex;\n"
6952 "uniform mat4 mvp;\n"
6953 "attribute vec4 color;\n"
6954 "varying vec4 col;\n"
6955 "attribute vec2 tex_coord;\n"
6956 "varying vec2 tex_c;\n"
6957 "void main()\n"
6958 "{\n"
6959 " gl_Position = mvp * vertex;\n"
6960 " col = color;\n"
6961 " tex_c = tex_coord;\n"
6962 "}\n";
6963Evas_GL_Program_Source shader_imgnat_vert_src =
6964{
6965 imgnat_vert_glsl,
6966 NULL, 0
6967};
6968
6969static const char imgnat_bgra_frag_glsl[] =
6970 "#ifdef GL_ES\n"
6971 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
6972 "precision highp float;\n"
6973 "#else\n"
6974 "precision mediump float;\n"
6975 "#endif\n"
6976 "#endif\n"
6977 "varying vec4 col;\n"
6978 "uniform sampler2D tex;\n"
6979 "varying vec2 tex_c;\n"
6980 "void main()\n"
6981 "{\n"
6982 " vec4 c;\n"
6983 " c = texture2D(tex, tex_c).rgba;\n"
6984 " gl_FragColor =\n"
6985 " c\n"
6986 " * col\n"
6987 " ;\n"
6988 "}\n";
6989Evas_GL_Program_Source shader_imgnat_bgra_frag_src =
6990{
6991 imgnat_bgra_frag_glsl,
6992 NULL, 0
6993};
6994
6995static const char imgnat_bgra_vert_glsl[] =
6996 "#ifdef GL_ES\n"
6997 "precision highp float;\n"
6998 "#endif\n"
6999 "attribute vec4 vertex;\n"
7000 "uniform mat4 mvp;\n"
7001 "attribute vec4 color;\n"
7002 "varying vec4 col;\n"
7003 "attribute vec2 tex_coord;\n"
7004 "varying vec2 tex_c;\n"
7005 "void main()\n"
7006 "{\n"
7007 " gl_Position = mvp * vertex;\n"
7008 " col = color;\n"
7009 " tex_c = tex_coord;\n"
7010 "}\n";
7011Evas_GL_Program_Source shader_imgnat_bgra_vert_src =
7012{
7013 imgnat_bgra_vert_glsl,
7014 NULL, 0
7015};
7016
7017static const char imgnat_12_frag_glsl[] =
7018 "#ifdef GL_ES\n"
7019 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
7020 "precision highp float;\n"
7021 "#else\n"
7022 "precision mediump float;\n"
7023 "#endif\n"
7024 "#endif\n"
7025 "varying vec4 col;\n"
7026 "uniform sampler2D tex;\n"
7027 "varying vec2 tex_c;\n"
7028 "varying vec4 div_s;\n"
7029 "varying vec2 tex_s[2];\n"
7030 "void main()\n"
7031 "{\n"
7032 " vec4 c;\n"
7033 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
7034 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
7035 " c = (col00 + col01) / div_s;\n"
7036 " gl_FragColor =\n"
7037 " c\n"
7038 " * col\n"
7039 " ;\n"
7040 "}\n";
7041Evas_GL_Program_Source shader_imgnat_12_frag_src =
7042{
7043 imgnat_12_frag_glsl,
7044 NULL, 0
7045};
7046
7047static const char imgnat_12_vert_glsl[] =
7048 "#ifdef GL_ES\n"
7049 "precision highp float;\n"
7050 "#endif\n"
7051 "attribute vec4 vertex;\n"
7052 "uniform mat4 mvp;\n"
7053 "attribute vec4 color;\n"
7054 "varying vec4 col;\n"
7055 "attribute vec2 tex_coord;\n"
7056 "varying vec2 tex_c;\n"
7057 "attribute vec2 tex_sample;\n"
7058 "varying vec4 div_s;\n"
7059 "varying vec2 tex_s[2];\n"
7060 "void main()\n"
7061 "{\n"
7062 " gl_Position = mvp * vertex;\n"
7063 " col = color;\n"
7064 " tex_c = tex_coord;\n"
7065 " tex_s[0] = vec2(0, -tex_sample.y);\n"
7066 " tex_s[1] = vec2(0, tex_sample.y);\n"
7067 " div_s = vec4(2, 2, 2, 2);\n"
7068 "}\n";
7069Evas_GL_Program_Source shader_imgnat_12_vert_src =
7070{
7071 imgnat_12_vert_glsl,
7072 NULL, 0
7073};
7074
7075static const char imgnat_21_frag_glsl[] =
7076 "#ifdef GL_ES\n"
7077 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
7078 "precision highp float;\n"
7079 "#else\n"
7080 "precision mediump float;\n"
7081 "#endif\n"
7082 "#endif\n"
7083 "varying vec4 col;\n"
7084 "uniform sampler2D tex;\n"
7085 "varying vec2 tex_c;\n"
7086 "varying vec4 div_s;\n"
7087 "varying vec2 tex_s[2];\n"
7088 "void main()\n"
7089 "{\n"
7090 " vec4 c;\n"
7091 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
7092 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
7093 " c = (col00 + col01) / div_s;\n"
7094 " gl_FragColor =\n"
7095 " c\n"
7096 " * col\n"
7097 " ;\n"
7098 "}\n";
7099Evas_GL_Program_Source shader_imgnat_21_frag_src =
7100{
7101 imgnat_21_frag_glsl,
7102 NULL, 0
7103};
7104
7105static const char imgnat_21_vert_glsl[] =
7106 "#ifdef GL_ES\n"
7107 "precision highp float;\n"
7108 "#endif\n"
7109 "attribute vec4 vertex;\n"
7110 "uniform mat4 mvp;\n"
7111 "attribute vec4 color;\n"
7112 "varying vec4 col;\n"
7113 "attribute vec2 tex_coord;\n"
7114 "varying vec2 tex_c;\n"
7115 "attribute vec2 tex_sample;\n"
7116 "varying vec4 div_s;\n"
7117 "varying vec2 tex_s[2];\n"
7118 "void main()\n"
7119 "{\n"
7120 " gl_Position = mvp * vertex;\n"
7121 " col = color;\n"
7122 " tex_c = tex_coord;\n"
7123 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
7124 " tex_s[1] = vec2( tex_sample.x, 0);\n"
7125 " div_s = vec4(2, 2, 2, 2);\n"
7126 "}\n";
7127Evas_GL_Program_Source shader_imgnat_21_vert_src =
7128{
7129 imgnat_21_vert_glsl,
7130 NULL, 0
7131};
7132
7133static const char imgnat_22_frag_glsl[] =
7134 "#ifdef GL_ES\n"
7135 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
7136 "precision highp float;\n"
7137 "#else\n"
7138 "precision mediump float;\n"
7139 "#endif\n"
7140 "#endif\n"
7141 "varying vec4 col;\n"
7142 "uniform sampler2D tex;\n"
7143 "varying vec2 tex_c;\n"
7144 "varying vec4 div_s;\n"
7145 "varying vec2 tex_s[4];\n"
7146 "void main()\n"
7147 "{\n"
7148 " vec4 c;\n"
7149 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
7150 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
7151 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).bgra;\n"
7152 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).bgra;\n"
7153 " c = (col00 + col01 + col10 + col11) / div_s;\n"
7154 " gl_FragColor =\n"
7155 " c\n"
7156 " * col\n"
7157 " ;\n"
7158 "}\n";
7159Evas_GL_Program_Source shader_imgnat_22_frag_src =
7160{
7161 imgnat_22_frag_glsl,
7162 NULL, 0
7163};
7164
7165static const char imgnat_22_vert_glsl[] =
7166 "#ifdef GL_ES\n"
7167 "precision highp float;\n"
7168 "#endif\n"
7169 "attribute vec4 vertex;\n"
7170 "uniform mat4 mvp;\n"
7171 "attribute vec4 color;\n"
7172 "varying vec4 col;\n"
7173 "attribute vec2 tex_coord;\n"
7174 "varying vec2 tex_c;\n"
7175 "attribute vec2 tex_sample;\n"
7176 "varying vec4 div_s;\n"
7177 "varying vec2 tex_s[4];\n"
7178 "void main()\n"
7179 "{\n"
7180 " gl_Position = mvp * vertex;\n"
7181 " col = color;\n"
7182 " tex_c = tex_coord;\n"
7183 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
7184 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
7185 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
7186 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
7187 " div_s = vec4(4, 4, 4, 4);\n"
7188 "}\n";
7189Evas_GL_Program_Source shader_imgnat_22_vert_src =
7190{
7191 imgnat_22_vert_glsl,
7192 NULL, 0
7193};
7194
7195static const char imgnat_12_bgra_frag_glsl[] =
7196 "#ifdef GL_ES\n"
7197 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
7198 "precision highp float;\n"
7199 "#else\n"
7200 "precision mediump float;\n"
7201 "#endif\n"
7202 "#endif\n"
7203 "varying vec4 col;\n"
7204 "uniform sampler2D tex;\n"
7205 "varying vec2 tex_c;\n"
7206 "varying vec4 div_s;\n"
7207 "varying vec2 tex_s[2];\n"
7208 "void main()\n"
7209 "{\n"
7210 " vec4 c;\n"
7211 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).rgba;\n"
7212 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).rgba;\n"
7213 " c = (col00 + col01) / div_s;\n"
7214 " gl_FragColor =\n"
7215 " c\n"
7216 " * col\n"
7217 " ;\n"
7218 "}\n";
7219Evas_GL_Program_Source shader_imgnat_12_bgra_frag_src =
7220{
7221 imgnat_12_bgra_frag_glsl,
7222 NULL, 0
7223};
7224
7225static const char imgnat_12_bgra_vert_glsl[] =
7226 "#ifdef GL_ES\n"
7227 "precision highp float;\n"
7228 "#endif\n"
7229 "attribute vec4 vertex;\n"
7230 "uniform mat4 mvp;\n"
7231 "attribute vec4 color;\n"
7232 "varying vec4 col;\n"
7233 "attribute vec2 tex_coord;\n"
7234 "varying vec2 tex_c;\n"
7235 "attribute vec2 tex_sample;\n"
7236 "varying vec4 div_s;\n"
7237 "varying vec2 tex_s[2];\n"
7238 "void main()\n"
7239 "{\n"
7240 " gl_Position = mvp * vertex;\n"
7241 " col = color;\n"
7242 " tex_c = tex_coord;\n"
7243 " tex_s[0] = vec2(0, -tex_sample.y);\n"
7244 " tex_s[1] = vec2(0, tex_sample.y);\n"
7245 " div_s = vec4(2, 2, 2, 2);\n"
7246 "}\n";
7247Evas_GL_Program_Source shader_imgnat_12_bgra_vert_src =
7248{
7249 imgnat_12_bgra_vert_glsl,
7250 NULL, 0
7251};
7252
7253static const char imgnat_21_bgra_frag_glsl[] =
7254 "#ifdef GL_ES\n"
7255 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
7256 "precision highp float;\n"
7257 "#else\n"
7258 "precision mediump float;\n"
7259 "#endif\n"
7260 "#endif\n"
7261 "varying vec4 col;\n"
7262 "uniform sampler2D tex;\n"
7263 "varying vec2 tex_c;\n"
7264 "varying vec4 div_s;\n"
7265 "varying vec2 tex_s[2];\n"
7266 "void main()\n"
7267 "{\n"
7268 " vec4 c;\n"
7269 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).rgba;\n"
7270 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).rgba;\n"
7271 " c = (col00 + col01) / div_s;\n"
7272 " gl_FragColor =\n"
7273 " c\n"
7274 " * col\n"
7275 " ;\n"
7276 "}\n";
7277Evas_GL_Program_Source shader_imgnat_21_bgra_frag_src =
7278{
7279 imgnat_21_bgra_frag_glsl,
7280 NULL, 0
7281};
7282
7283static const char imgnat_21_bgra_vert_glsl[] =
7284 "#ifdef GL_ES\n"
7285 "precision highp float;\n"
7286 "#endif\n"
7287 "attribute vec4 vertex;\n"
7288 "uniform mat4 mvp;\n"
7289 "attribute vec4 color;\n"
7290 "varying vec4 col;\n"
7291 "attribute vec2 tex_coord;\n"
7292 "varying vec2 tex_c;\n"
7293 "attribute vec2 tex_sample;\n"
7294 "varying vec4 div_s;\n"
7295 "varying vec2 tex_s[2];\n"
7296 "void main()\n"
7297 "{\n"
7298 " gl_Position = mvp * vertex;\n"
7299 " col = color;\n"
7300 " tex_c = tex_coord;\n"
7301 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
7302 " tex_s[1] = vec2( tex_sample.x, 0);\n"
7303 " div_s = vec4(2, 2, 2, 2);\n"
7304 "}\n";
7305Evas_GL_Program_Source shader_imgnat_21_bgra_vert_src =
7306{
7307 imgnat_21_bgra_vert_glsl,
7308 NULL, 0
7309};
7310
7311static const char imgnat_22_bgra_frag_glsl[] =
7312 "#ifdef GL_ES\n"
7313 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
7314 "precision highp float;\n"
7315 "#else\n"
7316 "precision mediump float;\n"
7317 "#endif\n"
7318 "#endif\n"
7319 "varying vec4 col;\n"
7320 "uniform sampler2D tex;\n"
7321 "varying vec2 tex_c;\n"
7322 "varying vec4 div_s;\n"
7323 "varying vec2 tex_s[4];\n"
7324 "void main()\n"
7325 "{\n"
7326 " vec4 c;\n"
7327 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).rgba;\n"
7328 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).rgba;\n"
7329 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).rgba;\n"
7330 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).rgba;\n"
7331 " c = (col00 + col01 + col10 + col11) / div_s;\n"
7332 " gl_FragColor =\n"
7333 " c\n"
7334 " * col\n"
7335 " ;\n"
7336 "}\n";
7337Evas_GL_Program_Source shader_imgnat_22_bgra_frag_src =
7338{
7339 imgnat_22_bgra_frag_glsl,
7340 NULL, 0
7341};
7342
7343static const char imgnat_22_bgra_vert_glsl[] =
7344 "#ifdef GL_ES\n"
7345 "precision highp float;\n"
7346 "#endif\n"
7347 "attribute vec4 vertex;\n"
7348 "uniform mat4 mvp;\n"
7349 "attribute vec4 color;\n"
7350 "varying vec4 col;\n"
7351 "attribute vec2 tex_coord;\n"
7352 "varying vec2 tex_c;\n"
7353 "attribute vec2 tex_sample;\n"
7354 "varying vec4 div_s;\n"
7355 "varying vec2 tex_s[4];\n"
7356 "void main()\n"
7357 "{\n"
7358 " gl_Position = mvp * vertex;\n"
7359 " col = color;\n"
7360 " tex_c = tex_coord;\n"
7361 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
7362 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
7363 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
7364 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
7365 " div_s = vec4(4, 4, 4, 4);\n"
7366 "}\n";
7367Evas_GL_Program_Source shader_imgnat_22_bgra_vert_src =
7368{
7369 imgnat_22_bgra_vert_glsl,
7370 NULL, 0
7371};
7372
7373static const char imgnat_mask_frag_glsl[] =
7374 "#ifdef GL_ES\n"
7375 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
7376 "precision highp float;\n"
7377 "#else\n"
7378 "precision mediump float;\n"
7379 "#endif\n"
7380 "#endif\n"
7381 "varying vec4 col;\n"
7382 "uniform sampler2D tex;\n"
7383 "varying vec2 tex_c;\n"
7384 "uniform sampler2D texm;\n"
7385 "varying vec2 tex_m;\n"
7386 "void main()\n"
7387 "{\n"
7388 " vec4 c;\n"
7389 " c = texture2D(tex, tex_c).bgra;\n"
7390 " float ma;\n"
7391 " ma = texture2D(texm, tex_m).a;\n"
7392 " gl_FragColor =\n"
7393 " c\n"
7394 " * col\n"
7395 " * ma\n"
7396 " ;\n"
7397 "}\n";
7398Evas_GL_Program_Source shader_imgnat_mask_frag_src =
7399{
7400 imgnat_mask_frag_glsl,
7401 NULL, 0
7402};
7403
7404static const char imgnat_mask_vert_glsl[] =
7405 "#ifdef GL_ES\n"
7406 "precision highp float;\n"
7407 "#endif\n"
7408 "attribute vec4 vertex;\n"
7409 "uniform mat4 mvp;\n"
7410 "attribute vec4 color;\n"
7411 "varying vec4 col;\n"
7412 "attribute vec2 tex_coord;\n"
7413 "varying vec2 tex_c;\n"
7414 "attribute vec4 mask_coord;\n"
7415 "varying vec2 tex_m;\n"
7416 "void main()\n"
7417 "{\n"
7418 " gl_Position = mvp * vertex;\n"
7419 " col = color;\n"
7420 " tex_c = tex_coord;\n"
7421 " 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"
7422 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
7423 "}\n";
7424Evas_GL_Program_Source shader_imgnat_mask_vert_src =
7425{
7426 imgnat_mask_vert_glsl,
7427 NULL, 0
7428};
7429
7430static const char imgnat_bgra_mask_frag_glsl[] =
7431 "#ifdef GL_ES\n"
7432 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
7433 "precision highp float;\n"
7434 "#else\n"
7435 "precision mediump float;\n"
7436 "#endif\n"
7437 "#endif\n"
7438 "varying vec4 col;\n"
7439 "uniform sampler2D tex;\n"
7440 "varying vec2 tex_c;\n"
7441 "uniform sampler2D texm;\n"
7442 "varying vec2 tex_m;\n"
7443 "void main()\n"
7444 "{\n"
7445 " vec4 c;\n"
7446 " c = texture2D(tex, tex_c).rgba;\n"
7447 " float ma;\n"
7448 " ma = texture2D(texm, tex_m).a;\n"
7449 " gl_FragColor =\n"
7450 " c\n"
7451 " * col\n"
7452 " * ma\n"
7453 " ;\n"
7454 "}\n";
7455Evas_GL_Program_Source shader_imgnat_bgra_mask_frag_src =
7456{
7457 imgnat_bgra_mask_frag_glsl,
7458 NULL, 0
7459};
7460
7461static const char imgnat_bgra_mask_vert_glsl[] =
7462 "#ifdef GL_ES\n"
7463 "precision highp float;\n"
7464 "#endif\n"
7465 "attribute vec4 vertex;\n"
7466 "uniform mat4 mvp;\n"
7467 "attribute vec4 color;\n"
7468 "varying vec4 col;\n"
7469 "attribute vec2 tex_coord;\n"
7470 "varying vec2 tex_c;\n"
7471 "attribute vec4 mask_coord;\n"
7472 "varying vec2 tex_m;\n"
7473 "void main()\n"
7474 "{\n"
7475 " gl_Position = mvp * vertex;\n"
7476 " col = color;\n"
7477 " tex_c = tex_coord;\n"
7478 " 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"
7479 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
7480 "}\n";
7481Evas_GL_Program_Source shader_imgnat_bgra_mask_vert_src =
7482{
7483 imgnat_bgra_mask_vert_glsl,
7484 NULL, 0
7485};
7486
7487static const char imgnat_12_mask_frag_glsl[] =
7488 "#ifdef GL_ES\n"
7489 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
7490 "precision highp float;\n"
7491 "#else\n"
7492 "precision mediump float;\n"
7493 "#endif\n"
7494 "#endif\n"
7495 "varying vec4 col;\n"
7496 "uniform sampler2D tex;\n"
7497 "varying vec2 tex_c;\n"
7498 "varying vec4 div_s;\n"
7499 "varying vec2 tex_s[2];\n"
7500 "uniform sampler2D texm;\n"
7501 "varying vec2 tex_m;\n"
7502 "void main()\n"
7503 "{\n"
7504 " vec4 c;\n"
7505 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
7506 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
7507 " c = (col00 + col01) / div_s;\n"
7508 " float ma;\n"
7509 " ma = texture2D(texm, tex_m).a;\n"
7510 " gl_FragColor =\n"
7511 " c\n"
7512 " * col\n"
7513 " * ma\n"
7514 " ;\n"
7515 "}\n";
7516Evas_GL_Program_Source shader_imgnat_12_mask_frag_src =
7517{
7518 imgnat_12_mask_frag_glsl,
7519 NULL, 0
7520};
7521
7522static const char imgnat_12_mask_vert_glsl[] =
7523 "#ifdef GL_ES\n"
7524 "precision highp float;\n"
7525 "#endif\n"
7526 "attribute vec4 vertex;\n"
7527 "uniform mat4 mvp;\n"
7528 "attribute vec4 color;\n"
7529 "varying vec4 col;\n"
7530 "attribute vec2 tex_coord;\n"
7531 "varying vec2 tex_c;\n"
7532 "attribute vec2 tex_sample;\n"
7533 "varying vec4 div_s;\n"
7534 "varying vec2 tex_s[2];\n"
7535 "attribute vec4 mask_coord;\n"
7536 "varying vec2 tex_m;\n"
7537 "void main()\n"
7538 "{\n"
7539 " gl_Position = mvp * vertex;\n"
7540 " col = color;\n"
7541 " tex_c = tex_coord;\n"
7542 " tex_s[0] = vec2(0, -tex_sample.y);\n"
7543 " tex_s[1] = vec2(0, tex_sample.y);\n"
7544 " div_s = vec4(2, 2, 2, 2);\n"
7545 " 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"
7546 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
7547 "}\n";
7548Evas_GL_Program_Source shader_imgnat_12_mask_vert_src =
7549{
7550 imgnat_12_mask_vert_glsl,
7551 NULL, 0
7552};
7553
7554static const char imgnat_21_mask_frag_glsl[] =
7555 "#ifdef GL_ES\n"
7556 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
7557 "precision highp float;\n"
7558 "#else\n"
7559 "precision mediump float;\n"
7560 "#endif\n"
7561 "#endif\n"
7562 "varying vec4 col;\n"
7563 "uniform sampler2D tex;\n"
7564 "varying vec2 tex_c;\n"
7565 "varying vec4 div_s;\n"
7566 "varying vec2 tex_s[2];\n"
7567 "uniform sampler2D texm;\n"
7568 "varying vec2 tex_m;\n"
7569 "void main()\n"
7570 "{\n"
7571 " vec4 c;\n"
7572 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
7573 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
7574 " c = (col00 + col01) / div_s;\n"
7575 " float ma;\n"
7576 " ma = texture2D(texm, tex_m).a;\n"
7577 " gl_FragColor =\n"
7578 " c\n"
7579 " * col\n"
7580 " * ma\n"
7581 " ;\n"
7582 "}\n";
7583Evas_GL_Program_Source shader_imgnat_21_mask_frag_src =
7584{
7585 imgnat_21_mask_frag_glsl,
7586 NULL, 0
7587};
7588
7589static const char imgnat_21_mask_vert_glsl[] =
7590 "#ifdef GL_ES\n"
7591 "precision highp float;\n"
7592 "#endif\n"
7593 "attribute vec4 vertex;\n"
7594 "uniform mat4 mvp;\n"
7595 "attribute vec4 color;\n"
7596 "varying vec4 col;\n"
7597 "attribute vec2 tex_coord;\n"
7598 "varying vec2 tex_c;\n"
7599 "attribute vec2 tex_sample;\n"
7600 "varying vec4 div_s;\n"
7601 "varying vec2 tex_s[2];\n"
7602 "attribute vec4 mask_coord;\n"
7603 "varying vec2 tex_m;\n"
7604 "void main()\n"
7605 "{\n"
7606 " gl_Position = mvp * vertex;\n"
7607 " col = color;\n"
7608 " tex_c = tex_coord;\n"
7609 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
7610 " tex_s[1] = vec2( tex_sample.x, 0);\n"
7611 " div_s = vec4(2, 2, 2, 2);\n"
7612 " 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"
7613 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
7614 "}\n";
7615Evas_GL_Program_Source shader_imgnat_21_mask_vert_src =
7616{
7617 imgnat_21_mask_vert_glsl,
7618 NULL, 0
7619};
7620
7621static const char imgnat_22_mask_frag_glsl[] =
7622 "#ifdef GL_ES\n"
7623 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
7624 "precision highp float;\n"
7625 "#else\n"
7626 "precision mediump float;\n"
7627 "#endif\n"
7628 "#endif\n"
7629 "varying vec4 col;\n"
7630 "uniform sampler2D tex;\n"
7631 "varying vec2 tex_c;\n"
7632 "varying vec4 div_s;\n"
7633 "varying vec2 tex_s[4];\n"
7634 "uniform sampler2D texm;\n"
7635 "varying vec2 tex_m;\n"
7636 "void main()\n"
7637 "{\n"
7638 " vec4 c;\n"
7639 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
7640 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
7641 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).bgra;\n"
7642 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).bgra;\n"
7643 " c = (col00 + col01 + col10 + col11) / div_s;\n"
7644 " float ma;\n"
7645 " ma = texture2D(texm, tex_m).a;\n"
7646 " gl_FragColor =\n"
7647 " c\n"
7648 " * col\n"
7649 " * ma\n"
7650 " ;\n"
7651 "}\n";
7652Evas_GL_Program_Source shader_imgnat_22_mask_frag_src =
7653{
7654 imgnat_22_mask_frag_glsl,
7655 NULL, 0
7656};
7657
7658static const char imgnat_22_mask_vert_glsl[] =
7659 "#ifdef GL_ES\n"
7660 "precision highp float;\n"
7661 "#endif\n"
7662 "attribute vec4 vertex;\n"
7663 "uniform mat4 mvp;\n"
7664 "attribute vec4 color;\n"
7665 "varying vec4 col;\n"
7666 "attribute vec2 tex_coord;\n"
7667 "varying vec2 tex_c;\n"
7668 "attribute vec2 tex_sample;\n"
7669 "varying vec4 div_s;\n"
7670 "varying vec2 tex_s[4];\n"
7671 "attribute vec4 mask_coord;\n"
7672 "varying vec2 tex_m;\n"
7673 "void main()\n"
7674 "{\n"
7675 " gl_Position = mvp * vertex;\n"
7676 " col = color;\n"
7677 " tex_c = tex_coord;\n"
7678 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
7679 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
7680 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
7681 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
7682 " div_s = vec4(4, 4, 4, 4);\n"
7683 " 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"
7684 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
7685 "}\n";
7686Evas_GL_Program_Source shader_imgnat_22_mask_vert_src =
7687{
7688 imgnat_22_mask_vert_glsl,
7689 NULL, 0
7690};
7691
7692static const char imgnat_12_bgra_mask_frag_glsl[] =
7693 "#ifdef GL_ES\n"
7694 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
7695 "precision highp float;\n"
7696 "#else\n"
7697 "precision mediump float;\n"
7698 "#endif\n"
7699 "#endif\n"
7700 "varying vec4 col;\n"
7701 "uniform sampler2D tex;\n"
7702 "varying vec2 tex_c;\n"
7703 "varying vec4 div_s;\n"
7704 "varying vec2 tex_s[2];\n"
7705 "uniform sampler2D texm;\n"
7706 "varying vec2 tex_m;\n"
7707 "void main()\n"
7708 "{\n"
7709 " vec4 c;\n"
7710 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).rgba;\n"
7711 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).rgba;\n"
7712 " c = (col00 + col01) / div_s;\n"
7713 " float ma;\n"
7714 " ma = texture2D(texm, tex_m).a;\n"
7715 " gl_FragColor =\n"
7716 " c\n"
7717 " * col\n"
7718 " * ma\n"
7719 " ;\n"
7720 "}\n";
7721Evas_GL_Program_Source shader_imgnat_12_bgra_mask_frag_src =
7722{
7723 imgnat_12_bgra_mask_frag_glsl,
7724 NULL, 0
7725};
7726
7727static const char imgnat_12_bgra_mask_vert_glsl[] =
7728 "#ifdef GL_ES\n"
7729 "precision highp float;\n"
7730 "#endif\n"
7731 "attribute vec4 vertex;\n"
7732 "uniform mat4 mvp;\n"
7733 "attribute vec4 color;\n"
7734 "varying vec4 col;\n"
7735 "attribute vec2 tex_coord;\n"
7736 "varying vec2 tex_c;\n"
7737 "attribute vec2 tex_sample;\n"
7738 "varying vec4 div_s;\n"
7739 "varying vec2 tex_s[2];\n"
7740 "attribute vec4 mask_coord;\n"
7741 "varying vec2 tex_m;\n"
7742 "void main()\n"
7743 "{\n"
7744 " gl_Position = mvp * vertex;\n"
7745 " col = color;\n"
7746 " tex_c = tex_coord;\n"
7747 " tex_s[0] = vec2(0, -tex_sample.y);\n"
7748 " tex_s[1] = vec2(0, tex_sample.y);\n"
7749 " div_s = vec4(2, 2, 2, 2);\n"
7750 " 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"
7751 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
7752 "}\n";
7753Evas_GL_Program_Source shader_imgnat_12_bgra_mask_vert_src =
7754{
7755 imgnat_12_bgra_mask_vert_glsl,
7756 NULL, 0
7757};
7758
7759static const char imgnat_21_bgra_mask_frag_glsl[] =
7760 "#ifdef GL_ES\n"
7761 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
7762 "precision highp float;\n"
7763 "#else\n"
7764 "precision mediump float;\n"
7765 "#endif\n"
7766 "#endif\n"
7767 "varying vec4 col;\n"
7768 "uniform sampler2D tex;\n"
7769 "varying vec2 tex_c;\n"
7770 "varying vec4 div_s;\n"
7771 "varying vec2 tex_s[2];\n"
7772 "uniform sampler2D texm;\n"
7773 "varying vec2 tex_m;\n"
7774 "void main()\n"
7775 "{\n"
7776 " vec4 c;\n"
7777 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).rgba;\n"
7778 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).rgba;\n"
7779 " c = (col00 + col01) / div_s;\n"
7780 " float ma;\n"
7781 " ma = texture2D(texm, tex_m).a;\n"
7782 " gl_FragColor =\n"
7783 " c\n"
7784 " * col\n"
7785 " * ma\n"
7786 " ;\n"
7787 "}\n";
7788Evas_GL_Program_Source shader_imgnat_21_bgra_mask_frag_src =
7789{
7790 imgnat_21_bgra_mask_frag_glsl,
7791 NULL, 0
7792};
7793
7794static const char imgnat_21_bgra_mask_vert_glsl[] =
7795 "#ifdef GL_ES\n"
7796 "precision highp float;\n"
7797 "#endif\n"
7798 "attribute vec4 vertex;\n"
7799 "uniform mat4 mvp;\n"
7800 "attribute vec4 color;\n"
7801 "varying vec4 col;\n"
7802 "attribute vec2 tex_coord;\n"
7803 "varying vec2 tex_c;\n"
7804 "attribute vec2 tex_sample;\n"
7805 "varying vec4 div_s;\n"
7806 "varying vec2 tex_s[2];\n"
7807 "attribute vec4 mask_coord;\n"
7808 "varying vec2 tex_m;\n"
7809 "void main()\n"
7810 "{\n"
7811 " gl_Position = mvp * vertex;\n"
7812 " col = color;\n"
7813 " tex_c = tex_coord;\n"
7814 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
7815 " tex_s[1] = vec2( tex_sample.x, 0);\n"
7816 " div_s = vec4(2, 2, 2, 2);\n"
7817 " 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"
7818 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
7819 "}\n";
7820Evas_GL_Program_Source shader_imgnat_21_bgra_mask_vert_src =
7821{
7822 imgnat_21_bgra_mask_vert_glsl,
7823 NULL, 0
7824};
7825
7826static const char imgnat_22_bgra_mask_frag_glsl[] =
7827 "#ifdef GL_ES\n"
7828 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
7829 "precision highp float;\n"
7830 "#else\n"
7831 "precision mediump float;\n"
7832 "#endif\n"
7833 "#endif\n"
7834 "varying vec4 col;\n"
7835 "uniform sampler2D tex;\n"
7836 "varying vec2 tex_c;\n"
7837 "varying vec4 div_s;\n"
7838 "varying vec2 tex_s[4];\n"
7839 "uniform sampler2D texm;\n"
7840 "varying vec2 tex_m;\n"
7841 "void main()\n"
7842 "{\n"
7843 " vec4 c;\n"
7844 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).rgba;\n"
7845 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).rgba;\n"
7846 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).rgba;\n"
7847 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).rgba;\n"
7848 " c = (col00 + col01 + col10 + col11) / div_s;\n"
7849 " float ma;\n"
7850 " ma = texture2D(texm, tex_m).a;\n"
7851 " gl_FragColor =\n"
7852 " c\n"
7853 " * col\n"
7854 " * ma\n"
7855 " ;\n"
7856 "}\n";
7857Evas_GL_Program_Source shader_imgnat_22_bgra_mask_frag_src =
7858{
7859 imgnat_22_bgra_mask_frag_glsl,
7860 NULL, 0
7861};
7862
7863static const char imgnat_22_bgra_mask_vert_glsl[] =
7864 "#ifdef GL_ES\n"
7865 "precision highp float;\n"
7866 "#endif\n"
7867 "attribute vec4 vertex;\n"
7868 "uniform mat4 mvp;\n"
7869 "attribute vec4 color;\n"
7870 "varying vec4 col;\n"
7871 "attribute vec2 tex_coord;\n"
7872 "varying vec2 tex_c;\n"
7873 "attribute vec2 tex_sample;\n"
7874 "varying vec4 div_s;\n"
7875 "varying vec2 tex_s[4];\n"
7876 "attribute vec4 mask_coord;\n"
7877 "varying vec2 tex_m;\n"
7878 "void main()\n"
7879 "{\n"
7880 " gl_Position = mvp * vertex;\n"
7881 " col = color;\n"
7882 " tex_c = tex_coord;\n"
7883 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
7884 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
7885 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
7886 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
7887 " div_s = vec4(4, 4, 4, 4);\n"
7888 " 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"
7889 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
7890 "}\n";
7891Evas_GL_Program_Source shader_imgnat_22_bgra_mask_vert_src =
7892{
7893 imgnat_22_bgra_mask_vert_glsl,
7894 NULL, 0
7895};
7896
7897static const char imgnat_nomul_frag_glsl[] =
7898 "#ifdef GL_ES\n"
7899 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
7900 "precision highp float;\n"
7901 "#else\n"
7902 "precision mediump float;\n"
7903 "#endif\n"
7904 "#endif\n"
7905 "uniform sampler2D tex;\n"
7906 "varying vec2 tex_c;\n"
7907 "void main()\n"
7908 "{\n"
7909 " vec4 c;\n"
7910 " c = texture2D(tex, tex_c).bgra;\n"
7911 " gl_FragColor =\n"
7912 " c\n"
7913 " ;\n"
7914 "}\n";
7915Evas_GL_Program_Source shader_imgnat_nomul_frag_src =
7916{
7917 imgnat_nomul_frag_glsl,
7918 NULL, 0
7919};
7920
7921static const char imgnat_nomul_vert_glsl[] =
7922 "#ifdef GL_ES\n"
7923 "precision highp float;\n"
7924 "#endif\n"
7925 "attribute vec4 vertex;\n"
7926 "uniform mat4 mvp;\n"
7927 "attribute vec2 tex_coord;\n"
7928 "varying vec2 tex_c;\n"
7929 "void main()\n"
7930 "{\n"
7931 " gl_Position = mvp * vertex;\n"
7932 " tex_c = tex_coord;\n"
7933 "}\n";
7934Evas_GL_Program_Source shader_imgnat_nomul_vert_src =
7935{
7936 imgnat_nomul_vert_glsl,
7937 NULL, 0
7938};
7939
7940static const char imgnat_bgra_nomul_frag_glsl[] =
7941 "#ifdef GL_ES\n"
7942 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
7943 "precision highp float;\n"
7944 "#else\n"
7945 "precision mediump float;\n"
7946 "#endif\n"
7947 "#endif\n"
7948 "uniform sampler2D tex;\n"
7949 "varying vec2 tex_c;\n"
7950 "void main()\n"
7951 "{\n"
7952 " vec4 c;\n"
7953 " c = texture2D(tex, tex_c).rgba;\n"
7954 " gl_FragColor =\n"
7955 " c\n"
7956 " ;\n"
7957 "}\n";
7958Evas_GL_Program_Source shader_imgnat_bgra_nomul_frag_src =
7959{
7960 imgnat_bgra_nomul_frag_glsl,
7961 NULL, 0
7962};
7963
7964static const char imgnat_bgra_nomul_vert_glsl[] =
7965 "#ifdef GL_ES\n"
7966 "precision highp float;\n"
7967 "#endif\n"
7968 "attribute vec4 vertex;\n"
7969 "uniform mat4 mvp;\n"
7970 "attribute vec2 tex_coord;\n"
7971 "varying vec2 tex_c;\n"
7972 "void main()\n"
7973 "{\n"
7974 " gl_Position = mvp * vertex;\n"
7975 " tex_c = tex_coord;\n"
7976 "}\n";
7977Evas_GL_Program_Source shader_imgnat_bgra_nomul_vert_src =
7978{
7979 imgnat_bgra_nomul_vert_glsl,
7980 NULL, 0
7981};
7982
7983static const char imgnat_12_nomul_frag_glsl[] =
7984 "#ifdef GL_ES\n"
7985 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
7986 "precision highp float;\n"
7987 "#else\n"
7988 "precision mediump float;\n"
7989 "#endif\n"
7990 "#endif\n"
7991 "uniform sampler2D tex;\n"
7992 "varying vec2 tex_c;\n"
7993 "varying vec4 div_s;\n"
7994 "varying vec2 tex_s[2];\n"
7995 "void main()\n"
7996 "{\n"
7997 " vec4 c;\n"
7998 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
7999 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
8000 " c = (col00 + col01) / div_s;\n"
8001 " gl_FragColor =\n"
8002 " c\n"
8003 " ;\n"
8004 "}\n";
8005Evas_GL_Program_Source shader_imgnat_12_nomul_frag_src =
8006{
8007 imgnat_12_nomul_frag_glsl,
8008 NULL, 0
8009};
8010
8011static const char imgnat_12_nomul_vert_glsl[] =
8012 "#ifdef GL_ES\n"
8013 "precision highp float;\n"
8014 "#endif\n"
8015 "attribute vec4 vertex;\n"
8016 "uniform mat4 mvp;\n"
8017 "attribute vec2 tex_coord;\n"
8018 "varying vec2 tex_c;\n"
8019 "attribute vec2 tex_sample;\n"
8020 "varying vec4 div_s;\n"
8021 "varying vec2 tex_s[2];\n"
8022 "void main()\n"
8023 "{\n"
8024 " gl_Position = mvp * vertex;\n"
8025 " tex_c = tex_coord;\n"
8026 " tex_s[0] = vec2(0, -tex_sample.y);\n"
8027 " tex_s[1] = vec2(0, tex_sample.y);\n"
8028 " div_s = vec4(2, 2, 2, 2);\n"
8029 "}\n";
8030Evas_GL_Program_Source shader_imgnat_12_nomul_vert_src =
8031{
8032 imgnat_12_nomul_vert_glsl,
8033 NULL, 0
8034};
8035
8036static const char imgnat_21_nomul_frag_glsl[] =
8037 "#ifdef GL_ES\n"
8038 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
8039 "precision highp float;\n"
8040 "#else\n"
8041 "precision mediump float;\n"
8042 "#endif\n"
8043 "#endif\n"
8044 "uniform sampler2D tex;\n"
8045 "varying vec2 tex_c;\n"
8046 "varying vec4 div_s;\n"
8047 "varying vec2 tex_s[2];\n"
8048 "void main()\n"
8049 "{\n"
8050 " vec4 c;\n"
8051 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
8052 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
8053 " c = (col00 + col01) / div_s;\n"
8054 " gl_FragColor =\n"
8055 " c\n"
8056 " ;\n"
8057 "}\n";
8058Evas_GL_Program_Source shader_imgnat_21_nomul_frag_src =
8059{
8060 imgnat_21_nomul_frag_glsl,
8061 NULL, 0
8062};
8063
8064static const char imgnat_21_nomul_vert_glsl[] =
8065 "#ifdef GL_ES\n"
8066 "precision highp float;\n"
8067 "#endif\n"
8068 "attribute vec4 vertex;\n"
8069 "uniform mat4 mvp;\n"
8070 "attribute vec2 tex_coord;\n"
8071 "varying vec2 tex_c;\n"
8072 "attribute vec2 tex_sample;\n"
8073 "varying vec4 div_s;\n"
8074 "varying vec2 tex_s[2];\n"
8075 "void main()\n"
8076 "{\n"
8077 " gl_Position = mvp * vertex;\n"
8078 " tex_c = tex_coord;\n"
8079 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
8080 " tex_s[1] = vec2( tex_sample.x, 0);\n"
8081 " div_s = vec4(2, 2, 2, 2);\n"
8082 "}\n";
8083Evas_GL_Program_Source shader_imgnat_21_nomul_vert_src =
8084{
8085 imgnat_21_nomul_vert_glsl,
8086 NULL, 0
8087};
8088
8089static const char imgnat_22_nomul_frag_glsl[] =
8090 "#ifdef GL_ES\n"
8091 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
8092 "precision highp float;\n"
8093 "#else\n"
8094 "precision mediump float;\n"
8095 "#endif\n"
8096 "#endif\n"
8097 "uniform sampler2D tex;\n"
8098 "varying vec2 tex_c;\n"
8099 "varying vec4 div_s;\n"
8100 "varying vec2 tex_s[4];\n"
8101 "void main()\n"
8102 "{\n"
8103 " vec4 c;\n"
8104 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
8105 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
8106 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).bgra;\n"
8107 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).bgra;\n"
8108 " c = (col00 + col01 + col10 + col11) / div_s;\n"
8109 " gl_FragColor =\n"
8110 " c\n"
8111 " ;\n"
8112 "}\n";
8113Evas_GL_Program_Source shader_imgnat_22_nomul_frag_src =
8114{
8115 imgnat_22_nomul_frag_glsl,
8116 NULL, 0
8117};
8118
8119static const char imgnat_22_nomul_vert_glsl[] =
8120 "#ifdef GL_ES\n"
8121 "precision highp float;\n"
8122 "#endif\n"
8123 "attribute vec4 vertex;\n"
8124 "uniform mat4 mvp;\n"
8125 "attribute vec2 tex_coord;\n"
8126 "varying vec2 tex_c;\n"
8127 "attribute vec2 tex_sample;\n"
8128 "varying vec4 div_s;\n"
8129 "varying vec2 tex_s[4];\n"
8130 "void main()\n"
8131 "{\n"
8132 " gl_Position = mvp * vertex;\n"
8133 " tex_c = tex_coord;\n"
8134 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
8135 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
8136 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
8137 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
8138 " div_s = vec4(4, 4, 4, 4);\n"
8139 "}\n";
8140Evas_GL_Program_Source shader_imgnat_22_nomul_vert_src =
8141{
8142 imgnat_22_nomul_vert_glsl,
8143 NULL, 0
8144};
8145
8146static const char imgnat_12_bgra_nomul_frag_glsl[] =
8147 "#ifdef GL_ES\n"
8148 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
8149 "precision highp float;\n"
8150 "#else\n"
8151 "precision mediump float;\n"
8152 "#endif\n"
8153 "#endif\n"
8154 "uniform sampler2D tex;\n"
8155 "varying vec2 tex_c;\n"
8156 "varying vec4 div_s;\n"
8157 "varying vec2 tex_s[2];\n"
8158 "void main()\n"
8159 "{\n"
8160 " vec4 c;\n"
8161 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).rgba;\n"
8162 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).rgba;\n"
8163 " c = (col00 + col01) / div_s;\n"
8164 " gl_FragColor =\n"
8165 " c\n"
8166 " ;\n"
8167 "}\n";
8168Evas_GL_Program_Source shader_imgnat_12_bgra_nomul_frag_src =
8169{
8170 imgnat_12_bgra_nomul_frag_glsl,
8171 NULL, 0
8172};
8173
8174static const char imgnat_12_bgra_nomul_vert_glsl[] =
8175 "#ifdef GL_ES\n"
8176 "precision highp float;\n"
8177 "#endif\n"
8178 "attribute vec4 vertex;\n"
8179 "uniform mat4 mvp;\n"
8180 "attribute vec2 tex_coord;\n"
8181 "varying vec2 tex_c;\n"
8182 "attribute vec2 tex_sample;\n"
8183 "varying vec4 div_s;\n"
8184 "varying vec2 tex_s[2];\n"
8185 "void main()\n"
8186 "{\n"
8187 " gl_Position = mvp * vertex;\n"
8188 " tex_c = tex_coord;\n"
8189 " tex_s[0] = vec2(0, -tex_sample.y);\n"
8190 " tex_s[1] = vec2(0, tex_sample.y);\n"
8191 " div_s = vec4(2, 2, 2, 2);\n"
8192 "}\n";
8193Evas_GL_Program_Source shader_imgnat_12_bgra_nomul_vert_src =
8194{
8195 imgnat_12_bgra_nomul_vert_glsl,
8196 NULL, 0
8197};
8198
8199static const char imgnat_21_bgra_nomul_frag_glsl[] =
8200 "#ifdef GL_ES\n"
8201 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
8202 "precision highp float;\n"
8203 "#else\n"
8204 "precision mediump float;\n"
8205 "#endif\n"
8206 "#endif\n"
8207 "uniform sampler2D tex;\n"
8208 "varying vec2 tex_c;\n"
8209 "varying vec4 div_s;\n"
8210 "varying vec2 tex_s[2];\n"
8211 "void main()\n"
8212 "{\n"
8213 " vec4 c;\n"
8214 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).rgba;\n"
8215 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).rgba;\n"
8216 " c = (col00 + col01) / div_s;\n"
8217 " gl_FragColor =\n"
8218 " c\n"
8219 " ;\n"
8220 "}\n";
8221Evas_GL_Program_Source shader_imgnat_21_bgra_nomul_frag_src =
8222{
8223 imgnat_21_bgra_nomul_frag_glsl,
8224 NULL, 0
8225};
8226
8227static const char imgnat_21_bgra_nomul_vert_glsl[] =
8228 "#ifdef GL_ES\n"
8229 "precision highp float;\n"
8230 "#endif\n"
8231 "attribute vec4 vertex;\n"
8232 "uniform mat4 mvp;\n"
8233 "attribute vec2 tex_coord;\n"
8234 "varying vec2 tex_c;\n"
8235 "attribute vec2 tex_sample;\n"
8236 "varying vec4 div_s;\n"
8237 "varying vec2 tex_s[2];\n"
8238 "void main()\n"
8239 "{\n"
8240 " gl_Position = mvp * vertex;\n"
8241 " tex_c = tex_coord;\n"
8242 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
8243 " tex_s[1] = vec2( tex_sample.x, 0);\n"
8244 " div_s = vec4(2, 2, 2, 2);\n"
8245 "}\n";
8246Evas_GL_Program_Source shader_imgnat_21_bgra_nomul_vert_src =
8247{
8248 imgnat_21_bgra_nomul_vert_glsl,
8249 NULL, 0
8250};
8251
8252static const char imgnat_22_bgra_nomul_frag_glsl[] =
8253 "#ifdef GL_ES\n"
8254 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
8255 "precision highp float;\n"
8256 "#else\n"
8257 "precision mediump float;\n"
8258 "#endif\n"
8259 "#endif\n"
8260 "uniform sampler2D tex;\n"
8261 "varying vec2 tex_c;\n"
8262 "varying vec4 div_s;\n"
8263 "varying vec2 tex_s[4];\n"
8264 "void main()\n"
8265 "{\n"
8266 " vec4 c;\n"
8267 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).rgba;\n"
8268 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).rgba;\n"
8269 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).rgba;\n"
8270 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).rgba;\n"
8271 " c = (col00 + col01 + col10 + col11) / div_s;\n"
8272 " gl_FragColor =\n"
8273 " c\n"
8274 " ;\n"
8275 "}\n";
8276Evas_GL_Program_Source shader_imgnat_22_bgra_nomul_frag_src =
8277{
8278 imgnat_22_bgra_nomul_frag_glsl,
8279 NULL, 0
8280};
8281
8282static const char imgnat_22_bgra_nomul_vert_glsl[] =
8283 "#ifdef GL_ES\n"
8284 "precision highp float;\n"
8285 "#endif\n"
8286 "attribute vec4 vertex;\n"
8287 "uniform mat4 mvp;\n"
8288 "attribute vec2 tex_coord;\n"
8289 "varying vec2 tex_c;\n"
8290 "attribute vec2 tex_sample;\n"
8291 "varying vec4 div_s;\n"
8292 "varying vec2 tex_s[4];\n"
8293 "void main()\n"
8294 "{\n"
8295 " gl_Position = mvp * vertex;\n"
8296 " tex_c = tex_coord;\n"
8297 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
8298 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
8299 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
8300 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
8301 " div_s = vec4(4, 4, 4, 4);\n"
8302 "}\n";
8303Evas_GL_Program_Source shader_imgnat_22_bgra_nomul_vert_src =
8304{
8305 imgnat_22_bgra_nomul_vert_glsl,
8306 NULL, 0
8307};
8308
8309static const char imgnat_mask_nomul_frag_glsl[] =
8310 "#ifdef GL_ES\n"
8311 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
8312 "precision highp float;\n"
8313 "#else\n"
8314 "precision mediump float;\n"
8315 "#endif\n"
8316 "#endif\n"
8317 "uniform sampler2D tex;\n"
8318 "varying vec2 tex_c;\n"
8319 "uniform sampler2D texm;\n"
8320 "varying vec2 tex_m;\n"
8321 "void main()\n"
8322 "{\n"
8323 " vec4 c;\n"
8324 " c = texture2D(tex, tex_c).bgra;\n"
8325 " float ma;\n"
8326 " ma = texture2D(texm, tex_m).a;\n"
8327 " gl_FragColor =\n"
8328 " c\n"
8329 " * ma\n"
8330 " ;\n"
8331 "}\n";
8332Evas_GL_Program_Source shader_imgnat_mask_nomul_frag_src =
8333{
8334 imgnat_mask_nomul_frag_glsl,
8335 NULL, 0
8336};
8337
8338static const char imgnat_mask_nomul_vert_glsl[] =
8339 "#ifdef GL_ES\n"
8340 "precision highp float;\n"
8341 "#endif\n"
8342 "attribute vec4 vertex;\n"
8343 "uniform mat4 mvp;\n"
8344 "attribute vec2 tex_coord;\n"
8345 "varying vec2 tex_c;\n"
8346 "attribute vec4 mask_coord;\n"
8347 "varying vec2 tex_m;\n"
8348 "void main()\n"
8349 "{\n"
8350 " gl_Position = mvp * vertex;\n"
8351 " tex_c = tex_coord;\n"
8352 " 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"
8353 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
8354 "}\n";
8355Evas_GL_Program_Source shader_imgnat_mask_nomul_vert_src =
8356{
8357 imgnat_mask_nomul_vert_glsl,
8358 NULL, 0
8359};
8360
8361static const char imgnat_bgra_mask_nomul_frag_glsl[] =
8362 "#ifdef GL_ES\n"
8363 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
8364 "precision highp float;\n"
8365 "#else\n"
8366 "precision mediump float;\n"
8367 "#endif\n"
8368 "#endif\n"
8369 "uniform sampler2D tex;\n"
8370 "varying vec2 tex_c;\n"
8371 "uniform sampler2D texm;\n"
8372 "varying vec2 tex_m;\n"
8373 "void main()\n"
8374 "{\n"
8375 " vec4 c;\n"
8376 " c = texture2D(tex, tex_c).rgba;\n"
8377 " float ma;\n"
8378 " ma = texture2D(texm, tex_m).a;\n"
8379 " gl_FragColor =\n"
8380 " c\n"
8381 " * ma\n"
8382 " ;\n"
8383 "}\n";
8384Evas_GL_Program_Source shader_imgnat_bgra_mask_nomul_frag_src =
8385{
8386 imgnat_bgra_mask_nomul_frag_glsl,
8387 NULL, 0
8388};
8389
8390static const char imgnat_bgra_mask_nomul_vert_glsl[] =
8391 "#ifdef GL_ES\n"
8392 "precision highp float;\n"
8393 "#endif\n"
8394 "attribute vec4 vertex;\n"
8395 "uniform mat4 mvp;\n"
8396 "attribute vec2 tex_coord;\n"
8397 "varying vec2 tex_c;\n"
8398 "attribute vec4 mask_coord;\n"
8399 "varying vec2 tex_m;\n"
8400 "void main()\n"
8401 "{\n"
8402 " gl_Position = mvp * vertex;\n"
8403 " tex_c = tex_coord;\n"
8404 " 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"
8405 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
8406 "}\n";
8407Evas_GL_Program_Source shader_imgnat_bgra_mask_nomul_vert_src =
8408{
8409 imgnat_bgra_mask_nomul_vert_glsl,
8410 NULL, 0
8411};
8412
8413static const char imgnat_12_mask_nomul_frag_glsl[] =
8414 "#ifdef GL_ES\n"
8415 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
8416 "precision highp float;\n"
8417 "#else\n"
8418 "precision mediump float;\n"
8419 "#endif\n"
8420 "#endif\n"
8421 "uniform sampler2D tex;\n"
8422 "varying vec2 tex_c;\n"
8423 "varying vec4 div_s;\n"
8424 "varying vec2 tex_s[2];\n"
8425 "uniform sampler2D texm;\n"
8426 "varying vec2 tex_m;\n"
8427 "void main()\n"
8428 "{\n"
8429 " vec4 c;\n"
8430 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
8431 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
8432 " c = (col00 + col01) / div_s;\n"
8433 " float ma;\n"
8434 " ma = texture2D(texm, tex_m).a;\n"
8435 " gl_FragColor =\n"
8436 " c\n"
8437 " * ma\n"
8438 " ;\n"
8439 "}\n";
8440Evas_GL_Program_Source shader_imgnat_12_mask_nomul_frag_src =
8441{
8442 imgnat_12_mask_nomul_frag_glsl,
8443 NULL, 0
8444};
8445
8446static const char imgnat_12_mask_nomul_vert_glsl[] =
8447 "#ifdef GL_ES\n"
8448 "precision highp float;\n"
8449 "#endif\n"
8450 "attribute vec4 vertex;\n"
8451 "uniform mat4 mvp;\n"
8452 "attribute vec2 tex_coord;\n"
8453 "varying vec2 tex_c;\n"
8454 "attribute vec2 tex_sample;\n"
8455 "varying vec4 div_s;\n"
8456 "varying vec2 tex_s[2];\n"
8457 "attribute vec4 mask_coord;\n"
8458 "varying vec2 tex_m;\n"
8459 "void main()\n"
8460 "{\n"
8461 " gl_Position = mvp * vertex;\n"
8462 " tex_c = tex_coord;\n"
8463 " tex_s[0] = vec2(0, -tex_sample.y);\n"
8464 " tex_s[1] = vec2(0, tex_sample.y);\n"
8465 " div_s = vec4(2, 2, 2, 2);\n"
8466 " 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"
8467 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
8468 "}\n";
8469Evas_GL_Program_Source shader_imgnat_12_mask_nomul_vert_src =
8470{
8471 imgnat_12_mask_nomul_vert_glsl,
8472 NULL, 0
8473};
8474
8475static const char imgnat_21_mask_nomul_frag_glsl[] =
8476 "#ifdef GL_ES\n"
8477 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
8478 "precision highp float;\n"
8479 "#else\n"
8480 "precision mediump float;\n"
8481 "#endif\n"
8482 "#endif\n"
8483 "uniform sampler2D tex;\n"
8484 "varying vec2 tex_c;\n"
8485 "varying vec4 div_s;\n"
8486 "varying vec2 tex_s[2];\n"
8487 "uniform sampler2D texm;\n"
8488 "varying vec2 tex_m;\n"
8489 "void main()\n"
8490 "{\n"
8491 " vec4 c;\n"
8492 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
8493 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
8494 " c = (col00 + col01) / div_s;\n"
8495 " float ma;\n"
8496 " ma = texture2D(texm, tex_m).a;\n"
8497 " gl_FragColor =\n"
8498 " c\n"
8499 " * ma\n"
8500 " ;\n"
8501 "}\n";
8502Evas_GL_Program_Source shader_imgnat_21_mask_nomul_frag_src =
8503{
8504 imgnat_21_mask_nomul_frag_glsl,
8505 NULL, 0
8506};
8507
8508static const char imgnat_21_mask_nomul_vert_glsl[] =
8509 "#ifdef GL_ES\n"
8510 "precision highp float;\n"
8511 "#endif\n"
8512 "attribute vec4 vertex;\n"
8513 "uniform mat4 mvp;\n"
8514 "attribute vec2 tex_coord;\n"
8515 "varying vec2 tex_c;\n"
8516 "attribute vec2 tex_sample;\n"
8517 "varying vec4 div_s;\n"
8518 "varying vec2 tex_s[2];\n"
8519 "attribute vec4 mask_coord;\n"
8520 "varying vec2 tex_m;\n"
8521 "void main()\n"
8522 "{\n"
8523 " gl_Position = mvp * vertex;\n"
8524 " tex_c = tex_coord;\n"
8525 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
8526 " tex_s[1] = vec2( tex_sample.x, 0);\n"
8527 " div_s = vec4(2, 2, 2, 2);\n"
8528 " 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"
8529 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
8530 "}\n";
8531Evas_GL_Program_Source shader_imgnat_21_mask_nomul_vert_src =
8532{
8533 imgnat_21_mask_nomul_vert_glsl,
8534 NULL, 0
8535};
8536
8537static const char imgnat_22_mask_nomul_frag_glsl[] =
8538 "#ifdef GL_ES\n"
8539 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
8540 "precision highp float;\n"
8541 "#else\n"
8542 "precision mediump float;\n"
8543 "#endif\n"
8544 "#endif\n"
8545 "uniform sampler2D tex;\n"
8546 "varying vec2 tex_c;\n"
8547 "varying vec4 div_s;\n"
8548 "varying vec2 tex_s[4];\n"
8549 "uniform sampler2D texm;\n"
8550 "varying vec2 tex_m;\n"
8551 "void main()\n"
8552 "{\n"
8553 " vec4 c;\n"
8554 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
8555 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
8556 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).bgra;\n"
8557 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).bgra;\n"
8558 " c = (col00 + col01 + col10 + col11) / div_s;\n"
8559 " float ma;\n"
8560 " ma = texture2D(texm, tex_m).a;\n"
8561 " gl_FragColor =\n"
8562 " c\n"
8563 " * ma\n"
8564 " ;\n"
8565 "}\n";
8566Evas_GL_Program_Source shader_imgnat_22_mask_nomul_frag_src =
8567{
8568 imgnat_22_mask_nomul_frag_glsl,
8569 NULL, 0
8570};
8571
8572static const char imgnat_22_mask_nomul_vert_glsl[] =
8573 "#ifdef GL_ES\n"
8574 "precision highp float;\n"
8575 "#endif\n"
8576 "attribute vec4 vertex;\n"
8577 "uniform mat4 mvp;\n"
8578 "attribute vec2 tex_coord;\n"
8579 "varying vec2 tex_c;\n"
8580 "attribute vec2 tex_sample;\n"
8581 "varying vec4 div_s;\n"
8582 "varying vec2 tex_s[4];\n"
8583 "attribute vec4 mask_coord;\n"
8584 "varying vec2 tex_m;\n"
8585 "void main()\n"
8586 "{\n"
8587 " gl_Position = mvp * vertex;\n"
8588 " tex_c = tex_coord;\n"
8589 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
8590 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
8591 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
8592 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
8593 " div_s = vec4(4, 4, 4, 4);\n"
8594 " 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"
8595 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
8596 "}\n";
8597Evas_GL_Program_Source shader_imgnat_22_mask_nomul_vert_src =
8598{
8599 imgnat_22_mask_nomul_vert_glsl,
8600 NULL, 0
8601};
8602
8603static const char imgnat_12_bgra_mask_nomul_frag_glsl[] =
8604 "#ifdef GL_ES\n"
8605 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
8606 "precision highp float;\n"
8607 "#else\n"
8608 "precision mediump float;\n"
8609 "#endif\n"
8610 "#endif\n"
8611 "uniform sampler2D tex;\n"
8612 "varying vec2 tex_c;\n"
8613 "varying vec4 div_s;\n"
8614 "varying vec2 tex_s[2];\n"
8615 "uniform sampler2D texm;\n"
8616 "varying vec2 tex_m;\n"
8617 "void main()\n"
8618 "{\n"
8619 " vec4 c;\n"
8620 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).rgba;\n"
8621 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).rgba;\n"
8622 " c = (col00 + col01) / div_s;\n"
8623 " float ma;\n"
8624 " ma = texture2D(texm, tex_m).a;\n"
8625 " gl_FragColor =\n"
8626 " c\n"
8627 " * ma\n"
8628 " ;\n"
8629 "}\n";
8630Evas_GL_Program_Source shader_imgnat_12_bgra_mask_nomul_frag_src =
8631{
8632 imgnat_12_bgra_mask_nomul_frag_glsl,
8633 NULL, 0
8634};
8635
8636static const char imgnat_12_bgra_mask_nomul_vert_glsl[] =
8637 "#ifdef GL_ES\n"
8638 "precision highp float;\n"
8639 "#endif\n"
8640 "attribute vec4 vertex;\n"
8641 "uniform mat4 mvp;\n"
8642 "attribute vec2 tex_coord;\n"
8643 "varying vec2 tex_c;\n"
8644 "attribute vec2 tex_sample;\n"
8645 "varying vec4 div_s;\n"
8646 "varying vec2 tex_s[2];\n"
8647 "attribute vec4 mask_coord;\n"
8648 "varying vec2 tex_m;\n"
8649 "void main()\n"
8650 "{\n"
8651 " gl_Position = mvp * vertex;\n"
8652 " tex_c = tex_coord;\n"
8653 " tex_s[0] = vec2(0, -tex_sample.y);\n"
8654 " tex_s[1] = vec2(0, tex_sample.y);\n"
8655 " div_s = vec4(2, 2, 2, 2);\n"
8656 " 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"
8657 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
8658 "}\n";
8659Evas_GL_Program_Source shader_imgnat_12_bgra_mask_nomul_vert_src =
8660{
8661 imgnat_12_bgra_mask_nomul_vert_glsl,
8662 NULL, 0
8663};
8664
8665static const char imgnat_21_bgra_mask_nomul_frag_glsl[] =
8666 "#ifdef GL_ES\n"
8667 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
8668 "precision highp float;\n"
8669 "#else\n"
8670 "precision mediump float;\n"
8671 "#endif\n"
8672 "#endif\n"
8673 "uniform sampler2D tex;\n"
8674 "varying vec2 tex_c;\n"
8675 "varying vec4 div_s;\n"
8676 "varying vec2 tex_s[2];\n"
8677 "uniform sampler2D texm;\n"
8678 "varying vec2 tex_m;\n"
8679 "void main()\n"
8680 "{\n"
8681 " vec4 c;\n"
8682 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).rgba;\n"
8683 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).rgba;\n"
8684 " c = (col00 + col01) / div_s;\n"
8685 " float ma;\n"
8686 " ma = texture2D(texm, tex_m).a;\n"
8687 " gl_FragColor =\n"
8688 " c\n"
8689 " * ma\n"
8690 " ;\n"
8691 "}\n";
8692Evas_GL_Program_Source shader_imgnat_21_bgra_mask_nomul_frag_src =
8693{
8694 imgnat_21_bgra_mask_nomul_frag_glsl,
8695 NULL, 0
8696};
8697
8698static const char imgnat_21_bgra_mask_nomul_vert_glsl[] =
8699 "#ifdef GL_ES\n"
8700 "precision highp float;\n"
8701 "#endif\n"
8702 "attribute vec4 vertex;\n"
8703 "uniform mat4 mvp;\n"
8704 "attribute vec2 tex_coord;\n"
8705 "varying vec2 tex_c;\n"
8706 "attribute vec2 tex_sample;\n"
8707 "varying vec4 div_s;\n"
8708 "varying vec2 tex_s[2];\n"
8709 "attribute vec4 mask_coord;\n"
8710 "varying vec2 tex_m;\n"
8711 "void main()\n"
8712 "{\n"
8713 " gl_Position = mvp * vertex;\n"
8714 " tex_c = tex_coord;\n"
8715 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
8716 " tex_s[1] = vec2( tex_sample.x, 0);\n"
8717 " div_s = vec4(2, 2, 2, 2);\n"
8718 " 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"
8719 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
8720 "}\n";
8721Evas_GL_Program_Source shader_imgnat_21_bgra_mask_nomul_vert_src =
8722{
8723 imgnat_21_bgra_mask_nomul_vert_glsl,
8724 NULL, 0
8725};
8726
8727static const char imgnat_22_bgra_mask_nomul_frag_glsl[] =
8728 "#ifdef GL_ES\n"
8729 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
8730 "precision highp float;\n"
8731 "#else\n"
8732 "precision mediump float;\n"
8733 "#endif\n"
8734 "#endif\n"
8735 "uniform sampler2D tex;\n"
8736 "varying vec2 tex_c;\n"
8737 "varying vec4 div_s;\n"
8738 "varying vec2 tex_s[4];\n"
8739 "uniform sampler2D texm;\n"
8740 "varying vec2 tex_m;\n"
8741 "void main()\n"
8742 "{\n"
8743 " vec4 c;\n"
8744 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).rgba;\n"
8745 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).rgba;\n"
8746 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).rgba;\n"
8747 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).rgba;\n"
8748 " c = (col00 + col01 + col10 + col11) / div_s;\n"
8749 " float ma;\n"
8750 " ma = texture2D(texm, tex_m).a;\n"
8751 " gl_FragColor =\n"
8752 " c\n"
8753 " * ma\n"
8754 " ;\n"
8755 "}\n";
8756Evas_GL_Program_Source shader_imgnat_22_bgra_mask_nomul_frag_src =
8757{
8758 imgnat_22_bgra_mask_nomul_frag_glsl,
8759 NULL, 0
8760};
8761
8762static const char imgnat_22_bgra_mask_nomul_vert_glsl[] =
8763 "#ifdef GL_ES\n"
8764 "precision highp float;\n"
8765 "#endif\n"
8766 "attribute vec4 vertex;\n"
8767 "uniform mat4 mvp;\n"
8768 "attribute vec2 tex_coord;\n"
8769 "varying vec2 tex_c;\n"
8770 "attribute vec2 tex_sample;\n"
8771 "varying vec4 div_s;\n"
8772 "varying vec2 tex_s[4];\n"
8773 "attribute vec4 mask_coord;\n"
8774 "varying vec2 tex_m;\n"
8775 "void main()\n"
8776 "{\n"
8777 " gl_Position = mvp * vertex;\n"
8778 " tex_c = tex_coord;\n"
8779 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
8780 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
8781 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
8782 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
8783 " div_s = vec4(4, 4, 4, 4);\n"
8784 " 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"
8785 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
8786 "}\n";
8787Evas_GL_Program_Source shader_imgnat_22_bgra_mask_nomul_vert_src =
8788{
8789 imgnat_22_bgra_mask_nomul_vert_glsl,
8790 NULL, 0
8791};
8792
8793static const char imgnat_mask12_frag_glsl[] =
8794 "#ifdef GL_ES\n"
8795 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
8796 "precision highp float;\n"
8797 "#else\n"
8798 "precision mediump float;\n"
8799 "#endif\n"
8800 "#endif\n"
8801 "varying vec4 col;\n"
8802 "uniform sampler2D tex;\n"
8803 "varying vec2 tex_c;\n"
8804 "uniform sampler2D texm;\n"
8805 "varying vec2 tex_m;\n"
8806 "varying float maskdiv_s;\n"
8807 "varying vec2 masktex_s[2];\n"
8808 "void main()\n"
8809 "{\n"
8810 " vec4 c;\n"
8811 " c = texture2D(tex, tex_c).bgra;\n"
8812 " float ma;\n"
8813 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
8814 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
8815 " ma = (ma00 + ma01) / maskdiv_s;\n"
8816 " gl_FragColor =\n"
8817 " c\n"
8818 " * col\n"
8819 " * ma\n"
8820 " ;\n"
8821 "}\n";
8822Evas_GL_Program_Source shader_imgnat_mask12_frag_src =
8823{
8824 imgnat_mask12_frag_glsl,
8825 NULL, 0
8826};
8827
8828static const char imgnat_mask12_vert_glsl[] =
8829 "#ifdef GL_ES\n"
8830 "precision highp float;\n"
8831 "#endif\n"
8832 "attribute vec4 vertex;\n"
8833 "uniform mat4 mvp;\n"
8834 "attribute vec4 color;\n"
8835 "varying vec4 col;\n"
8836 "attribute vec2 tex_coord;\n"
8837 "varying vec2 tex_c;\n"
8838 "attribute vec4 mask_coord;\n"
8839 "varying vec2 tex_m;\n"
8840 "attribute vec2 tex_masksample;\n"
8841 "varying float maskdiv_s;\n"
8842 "varying vec2 masktex_s[2];\n"
8843 "void main()\n"
8844 "{\n"
8845 " gl_Position = mvp * vertex;\n"
8846 " col = color;\n"
8847 " tex_c = tex_coord;\n"
8848 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
8849 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
8850 " maskdiv_s = 2.0;\n"
8851 " 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"
8852 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
8853 "}\n";
8854Evas_GL_Program_Source shader_imgnat_mask12_vert_src =
8855{
8856 imgnat_mask12_vert_glsl,
8857 NULL, 0
8858};
8859
8860static const char imgnat_bgra_mask12_frag_glsl[] =
8861 "#ifdef GL_ES\n"
8862 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
8863 "precision highp float;\n"
8864 "#else\n"
8865 "precision mediump float;\n"
8866 "#endif\n"
8867 "#endif\n"
8868 "varying vec4 col;\n"
8869 "uniform sampler2D tex;\n"
8870 "varying vec2 tex_c;\n"
8871 "uniform sampler2D texm;\n"
8872 "varying vec2 tex_m;\n"
8873 "varying float maskdiv_s;\n"
8874 "varying vec2 masktex_s[2];\n"
8875 "void main()\n"
8876 "{\n"
8877 " vec4 c;\n"
8878 " c = texture2D(tex, tex_c).rgba;\n"
8879 " float ma;\n"
8880 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
8881 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
8882 " ma = (ma00 + ma01) / maskdiv_s;\n"
8883 " gl_FragColor =\n"
8884 " c\n"
8885 " * col\n"
8886 " * ma\n"
8887 " ;\n"
8888 "}\n";
8889Evas_GL_Program_Source shader_imgnat_bgra_mask12_frag_src =
8890{
8891 imgnat_bgra_mask12_frag_glsl,
8892 NULL, 0
8893};
8894
8895static const char imgnat_bgra_mask12_vert_glsl[] =
8896 "#ifdef GL_ES\n"
8897 "precision highp float;\n"
8898 "#endif\n"
8899 "attribute vec4 vertex;\n"
8900 "uniform mat4 mvp;\n"
8901 "attribute vec4 color;\n"
8902 "varying vec4 col;\n"
8903 "attribute vec2 tex_coord;\n"
8904 "varying vec2 tex_c;\n"
8905 "attribute vec4 mask_coord;\n"
8906 "varying vec2 tex_m;\n"
8907 "attribute vec2 tex_masksample;\n"
8908 "varying float maskdiv_s;\n"
8909 "varying vec2 masktex_s[2];\n"
8910 "void main()\n"
8911 "{\n"
8912 " gl_Position = mvp * vertex;\n"
8913 " col = color;\n"
8914 " tex_c = tex_coord;\n"
8915 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
8916 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
8917 " maskdiv_s = 2.0;\n"
8918 " 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"
8919 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
8920 "}\n";
8921Evas_GL_Program_Source shader_imgnat_bgra_mask12_vert_src =
8922{
8923 imgnat_bgra_mask12_vert_glsl,
8924 NULL, 0
8925};
8926
8927static const char imgnat_12_mask12_frag_glsl[] =
8928 "#ifdef GL_ES\n"
8929 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
8930 "precision highp float;\n"
8931 "#else\n"
8932 "precision mediump float;\n"
8933 "#endif\n"
8934 "#endif\n"
8935 "varying vec4 col;\n"
8936 "uniform sampler2D tex;\n"
8937 "varying vec2 tex_c;\n"
8938 "varying vec4 div_s;\n"
8939 "varying vec2 tex_s[2];\n"
8940 "uniform sampler2D texm;\n"
8941 "varying vec2 tex_m;\n"
8942 "varying float maskdiv_s;\n"
8943 "varying vec2 masktex_s[2];\n"
8944 "void main()\n"
8945 "{\n"
8946 " vec4 c;\n"
8947 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
8948 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
8949 " c = (col00 + col01) / div_s;\n"
8950 " float ma;\n"
8951 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
8952 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
8953 " ma = (ma00 + ma01) / maskdiv_s;\n"
8954 " gl_FragColor =\n"
8955 " c\n"
8956 " * col\n"
8957 " * ma\n"
8958 " ;\n"
8959 "}\n";
8960Evas_GL_Program_Source shader_imgnat_12_mask12_frag_src =
8961{
8962 imgnat_12_mask12_frag_glsl,
8963 NULL, 0
8964};
8965
8966static const char imgnat_12_mask12_vert_glsl[] =
8967 "#ifdef GL_ES\n"
8968 "precision highp float;\n"
8969 "#endif\n"
8970 "attribute vec4 vertex;\n"
8971 "uniform mat4 mvp;\n"
8972 "attribute vec4 color;\n"
8973 "varying vec4 col;\n"
8974 "attribute vec2 tex_coord;\n"
8975 "varying vec2 tex_c;\n"
8976 "attribute vec2 tex_sample;\n"
8977 "varying vec4 div_s;\n"
8978 "varying vec2 tex_s[2];\n"
8979 "attribute vec4 mask_coord;\n"
8980 "varying vec2 tex_m;\n"
8981 "attribute vec2 tex_masksample;\n"
8982 "varying float maskdiv_s;\n"
8983 "varying vec2 masktex_s[2];\n"
8984 "void main()\n"
8985 "{\n"
8986 " gl_Position = mvp * vertex;\n"
8987 " col = color;\n"
8988 " tex_c = tex_coord;\n"
8989 " tex_s[0] = vec2(0, -tex_sample.y);\n"
8990 " tex_s[1] = vec2(0, tex_sample.y);\n"
8991 " div_s = vec4(2, 2, 2, 2);\n"
8992 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
8993 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
8994 " maskdiv_s = 2.0;\n"
8995 " 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"
8996 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
8997 "}\n";
8998Evas_GL_Program_Source shader_imgnat_12_mask12_vert_src =
8999{
9000 imgnat_12_mask12_vert_glsl,
9001 NULL, 0
9002};
9003
9004static const char imgnat_21_mask12_frag_glsl[] =
9005 "#ifdef GL_ES\n"
9006 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
9007 "precision highp float;\n"
9008 "#else\n"
9009 "precision mediump float;\n"
9010 "#endif\n"
9011 "#endif\n"
9012 "varying vec4 col;\n"
9013 "uniform sampler2D tex;\n"
9014 "varying vec2 tex_c;\n"
9015 "varying vec4 div_s;\n"
9016 "varying vec2 tex_s[2];\n"
9017 "uniform sampler2D texm;\n"
9018 "varying vec2 tex_m;\n"
9019 "varying float maskdiv_s;\n"
9020 "varying vec2 masktex_s[2];\n"
9021 "void main()\n"
9022 "{\n"
9023 " vec4 c;\n"
9024 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
9025 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
9026 " c = (col00 + col01) / div_s;\n"
9027 " float ma;\n"
9028 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
9029 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
9030 " ma = (ma00 + ma01) / maskdiv_s;\n"
9031 " gl_FragColor =\n"
9032 " c\n"
9033 " * col\n"
9034 " * ma\n"
9035 " ;\n"
9036 "}\n";
9037Evas_GL_Program_Source shader_imgnat_21_mask12_frag_src =
9038{
9039 imgnat_21_mask12_frag_glsl,
9040 NULL, 0
9041};
9042
9043static const char imgnat_21_mask12_vert_glsl[] =
9044 "#ifdef GL_ES\n"
9045 "precision highp float;\n"
9046 "#endif\n"
9047 "attribute vec4 vertex;\n"
9048 "uniform mat4 mvp;\n"
9049 "attribute vec4 color;\n"
9050 "varying vec4 col;\n"
9051 "attribute vec2 tex_coord;\n"
9052 "varying vec2 tex_c;\n"
9053 "attribute vec2 tex_sample;\n"
9054 "varying vec4 div_s;\n"
9055 "varying vec2 tex_s[2];\n"
9056 "attribute vec4 mask_coord;\n"
9057 "varying vec2 tex_m;\n"
9058 "attribute vec2 tex_masksample;\n"
9059 "varying float maskdiv_s;\n"
9060 "varying vec2 masktex_s[2];\n"
9061 "void main()\n"
9062 "{\n"
9063 " gl_Position = mvp * vertex;\n"
9064 " col = color;\n"
9065 " tex_c = tex_coord;\n"
9066 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
9067 " tex_s[1] = vec2( tex_sample.x, 0);\n"
9068 " div_s = vec4(2, 2, 2, 2);\n"
9069 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
9070 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
9071 " maskdiv_s = 2.0;\n"
9072 " 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"
9073 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
9074 "}\n";
9075Evas_GL_Program_Source shader_imgnat_21_mask12_vert_src =
9076{
9077 imgnat_21_mask12_vert_glsl,
9078 NULL, 0
9079};
9080
9081static const char imgnat_22_mask12_frag_glsl[] =
9082 "#ifdef GL_ES\n"
9083 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
9084 "precision highp float;\n"
9085 "#else\n"
9086 "precision mediump float;\n"
9087 "#endif\n"
9088 "#endif\n"
9089 "varying vec4 col;\n"
9090 "uniform sampler2D tex;\n"
9091 "varying vec2 tex_c;\n"
9092 "varying vec4 div_s;\n"
9093 "varying vec2 tex_s[4];\n"
9094 "uniform sampler2D texm;\n"
9095 "varying vec2 tex_m;\n"
9096 "varying float maskdiv_s;\n"
9097 "varying vec2 masktex_s[2];\n"
9098 "void main()\n"
9099 "{\n"
9100 " vec4 c;\n"
9101 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
9102 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
9103 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).bgra;\n"
9104 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).bgra;\n"
9105 " c = (col00 + col01 + col10 + col11) / div_s;\n"
9106 " float ma;\n"
9107 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
9108 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
9109 " ma = (ma00 + ma01) / maskdiv_s;\n"
9110 " gl_FragColor =\n"
9111 " c\n"
9112 " * col\n"
9113 " * ma\n"
9114 " ;\n"
9115 "}\n";
9116Evas_GL_Program_Source shader_imgnat_22_mask12_frag_src =
9117{
9118 imgnat_22_mask12_frag_glsl,
9119 NULL, 0
9120};
9121
9122static const char imgnat_22_mask12_vert_glsl[] =
9123 "#ifdef GL_ES\n"
9124 "precision highp float;\n"
9125 "#endif\n"
9126 "attribute vec4 vertex;\n"
9127 "uniform mat4 mvp;\n"
9128 "attribute vec4 color;\n"
9129 "varying vec4 col;\n"
9130 "attribute vec2 tex_coord;\n"
9131 "varying vec2 tex_c;\n"
9132 "attribute vec2 tex_sample;\n"
9133 "varying vec4 div_s;\n"
9134 "varying vec2 tex_s[4];\n"
9135 "attribute vec4 mask_coord;\n"
9136 "varying vec2 tex_m;\n"
9137 "attribute vec2 tex_masksample;\n"
9138 "varying float maskdiv_s;\n"
9139 "varying vec2 masktex_s[2];\n"
9140 "void main()\n"
9141 "{\n"
9142 " gl_Position = mvp * vertex;\n"
9143 " col = color;\n"
9144 " tex_c = tex_coord;\n"
9145 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
9146 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
9147 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
9148 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
9149 " div_s = vec4(4, 4, 4, 4);\n"
9150 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
9151 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
9152 " maskdiv_s = 2.0;\n"
9153 " 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"
9154 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
9155 "}\n";
9156Evas_GL_Program_Source shader_imgnat_22_mask12_vert_src =
9157{
9158 imgnat_22_mask12_vert_glsl,
9159 NULL, 0
9160};
9161
9162static const char imgnat_12_bgra_mask12_frag_glsl[] =
9163 "#ifdef GL_ES\n"
9164 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
9165 "precision highp float;\n"
9166 "#else\n"
9167 "precision mediump float;\n"
9168 "#endif\n"
9169 "#endif\n"
9170 "varying vec4 col;\n"
9171 "uniform sampler2D tex;\n"
9172 "varying vec2 tex_c;\n"
9173 "varying vec4 div_s;\n"
9174 "varying vec2 tex_s[2];\n"
9175 "uniform sampler2D texm;\n"
9176 "varying vec2 tex_m;\n"
9177 "varying float maskdiv_s;\n"
9178 "varying vec2 masktex_s[2];\n"
9179 "void main()\n"
9180 "{\n"
9181 " vec4 c;\n"
9182 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).rgba;\n"
9183 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).rgba;\n"
9184 " c = (col00 + col01) / div_s;\n"
9185 " float ma;\n"
9186 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
9187 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
9188 " ma = (ma00 + ma01) / maskdiv_s;\n"
9189 " gl_FragColor =\n"
9190 " c\n"
9191 " * col\n"
9192 " * ma\n"
9193 " ;\n"
9194 "}\n";
9195Evas_GL_Program_Source shader_imgnat_12_bgra_mask12_frag_src =
9196{
9197 imgnat_12_bgra_mask12_frag_glsl,
9198 NULL, 0
9199};
9200
9201static const char imgnat_12_bgra_mask12_vert_glsl[] =
9202 "#ifdef GL_ES\n"
9203 "precision highp float;\n"
9204 "#endif\n"
9205 "attribute vec4 vertex;\n"
9206 "uniform mat4 mvp;\n"
9207 "attribute vec4 color;\n"
9208 "varying vec4 col;\n"
9209 "attribute vec2 tex_coord;\n"
9210 "varying vec2 tex_c;\n"
9211 "attribute vec2 tex_sample;\n"
9212 "varying vec4 div_s;\n"
9213 "varying vec2 tex_s[2];\n"
9214 "attribute vec4 mask_coord;\n"
9215 "varying vec2 tex_m;\n"
9216 "attribute vec2 tex_masksample;\n"
9217 "varying float maskdiv_s;\n"
9218 "varying vec2 masktex_s[2];\n"
9219 "void main()\n"
9220 "{\n"
9221 " gl_Position = mvp * vertex;\n"
9222 " col = color;\n"
9223 " tex_c = tex_coord;\n"
9224 " tex_s[0] = vec2(0, -tex_sample.y);\n"
9225 " tex_s[1] = vec2(0, tex_sample.y);\n"
9226 " div_s = vec4(2, 2, 2, 2);\n"
9227 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
9228 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
9229 " maskdiv_s = 2.0;\n"
9230 " 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"
9231 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
9232 "}\n";
9233Evas_GL_Program_Source shader_imgnat_12_bgra_mask12_vert_src =
9234{
9235 imgnat_12_bgra_mask12_vert_glsl,
9236 NULL, 0
9237};
9238
9239static const char imgnat_21_bgra_mask12_frag_glsl[] =
9240 "#ifdef GL_ES\n"
9241 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
9242 "precision highp float;\n"
9243 "#else\n"
9244 "precision mediump float;\n"
9245 "#endif\n"
9246 "#endif\n"
9247 "varying vec4 col;\n"
9248 "uniform sampler2D tex;\n"
9249 "varying vec2 tex_c;\n"
9250 "varying vec4 div_s;\n"
9251 "varying vec2 tex_s[2];\n"
9252 "uniform sampler2D texm;\n"
9253 "varying vec2 tex_m;\n"
9254 "varying float maskdiv_s;\n"
9255 "varying vec2 masktex_s[2];\n"
9256 "void main()\n"
9257 "{\n"
9258 " vec4 c;\n"
9259 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).rgba;\n"
9260 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).rgba;\n"
9261 " c = (col00 + col01) / div_s;\n"
9262 " float ma;\n"
9263 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
9264 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
9265 " ma = (ma00 + ma01) / maskdiv_s;\n"
9266 " gl_FragColor =\n"
9267 " c\n"
9268 " * col\n"
9269 " * ma\n"
9270 " ;\n"
9271 "}\n";
9272Evas_GL_Program_Source shader_imgnat_21_bgra_mask12_frag_src =
9273{
9274 imgnat_21_bgra_mask12_frag_glsl,
9275 NULL, 0
9276};
9277
9278static const char imgnat_21_bgra_mask12_vert_glsl[] =
9279 "#ifdef GL_ES\n"
9280 "precision highp float;\n"
9281 "#endif\n"
9282 "attribute vec4 vertex;\n"
9283 "uniform mat4 mvp;\n"
9284 "attribute vec4 color;\n"
9285 "varying vec4 col;\n"
9286 "attribute vec2 tex_coord;\n"
9287 "varying vec2 tex_c;\n"
9288 "attribute vec2 tex_sample;\n"
9289 "varying vec4 div_s;\n"
9290 "varying vec2 tex_s[2];\n"
9291 "attribute vec4 mask_coord;\n"
9292 "varying vec2 tex_m;\n"
9293 "attribute vec2 tex_masksample;\n"
9294 "varying float maskdiv_s;\n"
9295 "varying vec2 masktex_s[2];\n"
9296 "void main()\n"
9297 "{\n"
9298 " gl_Position = mvp * vertex;\n"
9299 " col = color;\n"
9300 " tex_c = tex_coord;\n"
9301 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
9302 " tex_s[1] = vec2( tex_sample.x, 0);\n"
9303 " div_s = vec4(2, 2, 2, 2);\n"
9304 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
9305 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
9306 " maskdiv_s = 2.0;\n"
9307 " 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"
9308 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
9309 "}\n";
9310Evas_GL_Program_Source shader_imgnat_21_bgra_mask12_vert_src =
9311{
9312 imgnat_21_bgra_mask12_vert_glsl,
9313 NULL, 0
9314};
9315
9316static const char imgnat_22_bgra_mask12_frag_glsl[] =
9317 "#ifdef GL_ES\n"
9318 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
9319 "precision highp float;\n"
9320 "#else\n"
9321 "precision mediump float;\n"
9322 "#endif\n"
9323 "#endif\n"
9324 "varying vec4 col;\n"
9325 "uniform sampler2D tex;\n"
9326 "varying vec2 tex_c;\n"
9327 "varying vec4 div_s;\n"
9328 "varying vec2 tex_s[4];\n"
9329 "uniform sampler2D texm;\n"
9330 "varying vec2 tex_m;\n"
9331 "varying float maskdiv_s;\n"
9332 "varying vec2 masktex_s[2];\n"
9333 "void main()\n"
9334 "{\n"
9335 " vec4 c;\n"
9336 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).rgba;\n"
9337 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).rgba;\n"
9338 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).rgba;\n"
9339 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).rgba;\n"
9340 " c = (col00 + col01 + col10 + col11) / div_s;\n"
9341 " float ma;\n"
9342 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
9343 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
9344 " ma = (ma00 + ma01) / maskdiv_s;\n"
9345 " gl_FragColor =\n"
9346 " c\n"
9347 " * col\n"
9348 " * ma\n"
9349 " ;\n"
9350 "}\n";
9351Evas_GL_Program_Source shader_imgnat_22_bgra_mask12_frag_src =
9352{
9353 imgnat_22_bgra_mask12_frag_glsl,
9354 NULL, 0
9355};
9356
9357static const char imgnat_22_bgra_mask12_vert_glsl[] =
9358 "#ifdef GL_ES\n"
9359 "precision highp float;\n"
9360 "#endif\n"
9361 "attribute vec4 vertex;\n"
9362 "uniform mat4 mvp;\n"
9363 "attribute vec4 color;\n"
9364 "varying vec4 col;\n"
9365 "attribute vec2 tex_coord;\n"
9366 "varying vec2 tex_c;\n"
9367 "attribute vec2 tex_sample;\n"
9368 "varying vec4 div_s;\n"
9369 "varying vec2 tex_s[4];\n"
9370 "attribute vec4 mask_coord;\n"
9371 "varying vec2 tex_m;\n"
9372 "attribute vec2 tex_masksample;\n"
9373 "varying float maskdiv_s;\n"
9374 "varying vec2 masktex_s[2];\n"
9375 "void main()\n"
9376 "{\n"
9377 " gl_Position = mvp * vertex;\n"
9378 " col = color;\n"
9379 " tex_c = tex_coord;\n"
9380 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
9381 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
9382 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
9383 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
9384 " div_s = vec4(4, 4, 4, 4);\n"
9385 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
9386 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
9387 " maskdiv_s = 2.0;\n"
9388 " 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"
9389 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
9390 "}\n";
9391Evas_GL_Program_Source shader_imgnat_22_bgra_mask12_vert_src =
9392{
9393 imgnat_22_bgra_mask12_vert_glsl,
9394 NULL, 0
9395};
9396
9397static const char imgnat_mask12_nomul_frag_glsl[] =
9398 "#ifdef GL_ES\n"
9399 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
9400 "precision highp float;\n"
9401 "#else\n"
9402 "precision mediump float;\n"
9403 "#endif\n"
9404 "#endif\n"
9405 "uniform sampler2D tex;\n"
9406 "varying vec2 tex_c;\n"
9407 "uniform sampler2D texm;\n"
9408 "varying vec2 tex_m;\n"
9409 "varying float maskdiv_s;\n"
9410 "varying vec2 masktex_s[2];\n"
9411 "void main()\n"
9412 "{\n"
9413 " vec4 c;\n"
9414 " c = texture2D(tex, tex_c).bgra;\n"
9415 " float ma;\n"
9416 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
9417 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
9418 " ma = (ma00 + ma01) / maskdiv_s;\n"
9419 " gl_FragColor =\n"
9420 " c\n"
9421 " * ma\n"
9422 " ;\n"
9423 "}\n";
9424Evas_GL_Program_Source shader_imgnat_mask12_nomul_frag_src =
9425{
9426 imgnat_mask12_nomul_frag_glsl,
9427 NULL, 0
9428};
9429
9430static const char imgnat_mask12_nomul_vert_glsl[] =
9431 "#ifdef GL_ES\n"
9432 "precision highp float;\n"
9433 "#endif\n"
9434 "attribute vec4 vertex;\n"
9435 "uniform mat4 mvp;\n"
9436 "attribute vec2 tex_coord;\n"
9437 "varying vec2 tex_c;\n"
9438 "attribute vec4 mask_coord;\n"
9439 "varying vec2 tex_m;\n"
9440 "attribute vec2 tex_masksample;\n"
9441 "varying float maskdiv_s;\n"
9442 "varying vec2 masktex_s[2];\n"
9443 "void main()\n"
9444 "{\n"
9445 " gl_Position = mvp * vertex;\n"
9446 " tex_c = tex_coord;\n"
9447 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
9448 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
9449 " maskdiv_s = 2.0;\n"
9450 " 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"
9451 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
9452 "}\n";
9453Evas_GL_Program_Source shader_imgnat_mask12_nomul_vert_src =
9454{
9455 imgnat_mask12_nomul_vert_glsl,
9456 NULL, 0
9457};
9458
9459static const char imgnat_bgra_mask12_nomul_frag_glsl[] =
9460 "#ifdef GL_ES\n"
9461 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
9462 "precision highp float;\n"
9463 "#else\n"
9464 "precision mediump float;\n"
9465 "#endif\n"
9466 "#endif\n"
9467 "uniform sampler2D tex;\n"
9468 "varying vec2 tex_c;\n"
9469 "uniform sampler2D texm;\n"
9470 "varying vec2 tex_m;\n"
9471 "varying float maskdiv_s;\n"
9472 "varying vec2 masktex_s[2];\n"
9473 "void main()\n"
9474 "{\n"
9475 " vec4 c;\n"
9476 " c = texture2D(tex, tex_c).rgba;\n"
9477 " float ma;\n"
9478 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
9479 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
9480 " ma = (ma00 + ma01) / maskdiv_s;\n"
9481 " gl_FragColor =\n"
9482 " c\n"
9483 " * ma\n"
9484 " ;\n"
9485 "}\n";
9486Evas_GL_Program_Source shader_imgnat_bgra_mask12_nomul_frag_src =
9487{
9488 imgnat_bgra_mask12_nomul_frag_glsl,
9489 NULL, 0
9490};
9491
9492static const char imgnat_bgra_mask12_nomul_vert_glsl[] =
9493 "#ifdef GL_ES\n"
9494 "precision highp float;\n"
9495 "#endif\n"
9496 "attribute vec4 vertex;\n"
9497 "uniform mat4 mvp;\n"
9498 "attribute vec2 tex_coord;\n"
9499 "varying vec2 tex_c;\n"
9500 "attribute vec4 mask_coord;\n"
9501 "varying vec2 tex_m;\n"
9502 "attribute vec2 tex_masksample;\n"
9503 "varying float maskdiv_s;\n"
9504 "varying vec2 masktex_s[2];\n"
9505 "void main()\n"
9506 "{\n"
9507 " gl_Position = mvp * vertex;\n"
9508 " tex_c = tex_coord;\n"
9509 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
9510 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
9511 " maskdiv_s = 2.0;\n"
9512 " 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"
9513 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
9514 "}\n";
9515Evas_GL_Program_Source shader_imgnat_bgra_mask12_nomul_vert_src =
9516{
9517 imgnat_bgra_mask12_nomul_vert_glsl,
9518 NULL, 0
9519};
9520
9521static const char imgnat_12_mask12_nomul_frag_glsl[] =
9522 "#ifdef GL_ES\n"
9523 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
9524 "precision highp float;\n"
9525 "#else\n"
9526 "precision mediump float;\n"
9527 "#endif\n"
9528 "#endif\n"
9529 "uniform sampler2D tex;\n"
9530 "varying vec2 tex_c;\n"
9531 "varying vec4 div_s;\n"
9532 "varying vec2 tex_s[2];\n"
9533 "uniform sampler2D texm;\n"
9534 "varying vec2 tex_m;\n"
9535 "varying float maskdiv_s;\n"
9536 "varying vec2 masktex_s[2];\n"
9537 "void main()\n"
9538 "{\n"
9539 " vec4 c;\n"
9540 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
9541 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
9542 " c = (col00 + col01) / div_s;\n"
9543 " float ma;\n"
9544 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
9545 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
9546 " ma = (ma00 + ma01) / maskdiv_s;\n"
9547 " gl_FragColor =\n"
9548 " c\n"
9549 " * ma\n"
9550 " ;\n"
9551 "}\n";
9552Evas_GL_Program_Source shader_imgnat_12_mask12_nomul_frag_src =
9553{
9554 imgnat_12_mask12_nomul_frag_glsl,
9555 NULL, 0
9556};
9557
9558static const char imgnat_12_mask12_nomul_vert_glsl[] =
9559 "#ifdef GL_ES\n"
9560 "precision highp float;\n"
9561 "#endif\n"
9562 "attribute vec4 vertex;\n"
9563 "uniform mat4 mvp;\n"
9564 "attribute vec2 tex_coord;\n"
9565 "varying vec2 tex_c;\n"
9566 "attribute vec2 tex_sample;\n"
9567 "varying vec4 div_s;\n"
9568 "varying vec2 tex_s[2];\n"
9569 "attribute vec4 mask_coord;\n"
9570 "varying vec2 tex_m;\n"
9571 "attribute vec2 tex_masksample;\n"
9572 "varying float maskdiv_s;\n"
9573 "varying vec2 masktex_s[2];\n"
9574 "void main()\n"
9575 "{\n"
9576 " gl_Position = mvp * vertex;\n"
9577 " tex_c = tex_coord;\n"
9578 " tex_s[0] = vec2(0, -tex_sample.y);\n"
9579 " tex_s[1] = vec2(0, tex_sample.y);\n"
9580 " div_s = vec4(2, 2, 2, 2);\n"
9581 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
9582 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
9583 " maskdiv_s = 2.0;\n"
9584 " 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"
9585 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
9586 "}\n";
9587Evas_GL_Program_Source shader_imgnat_12_mask12_nomul_vert_src =
9588{
9589 imgnat_12_mask12_nomul_vert_glsl,
9590 NULL, 0
9591};
9592
9593static const char imgnat_21_mask12_nomul_frag_glsl[] =
9594 "#ifdef GL_ES\n"
9595 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
9596 "precision highp float;\n"
9597 "#else\n"
9598 "precision mediump float;\n"
9599 "#endif\n"
9600 "#endif\n"
9601 "uniform sampler2D tex;\n"
9602 "varying vec2 tex_c;\n"
9603 "varying vec4 div_s;\n"
9604 "varying vec2 tex_s[2];\n"
9605 "uniform sampler2D texm;\n"
9606 "varying vec2 tex_m;\n"
9607 "varying float maskdiv_s;\n"
9608 "varying vec2 masktex_s[2];\n"
9609 "void main()\n"
9610 "{\n"
9611 " vec4 c;\n"
9612 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
9613 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
9614 " c = (col00 + col01) / div_s;\n"
9615 " float ma;\n"
9616 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
9617 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
9618 " ma = (ma00 + ma01) / maskdiv_s;\n"
9619 " gl_FragColor =\n"
9620 " c\n"
9621 " * ma\n"
9622 " ;\n"
9623 "}\n";
9624Evas_GL_Program_Source shader_imgnat_21_mask12_nomul_frag_src =
9625{
9626 imgnat_21_mask12_nomul_frag_glsl,
9627 NULL, 0
9628};
9629
9630static const char imgnat_21_mask12_nomul_vert_glsl[] =
9631 "#ifdef GL_ES\n"
9632 "precision highp float;\n"
9633 "#endif\n"
9634 "attribute vec4 vertex;\n"
9635 "uniform mat4 mvp;\n"
9636 "attribute vec2 tex_coord;\n"
9637 "varying vec2 tex_c;\n"
9638 "attribute vec2 tex_sample;\n"
9639 "varying vec4 div_s;\n"
9640 "varying vec2 tex_s[2];\n"
9641 "attribute vec4 mask_coord;\n"
9642 "varying vec2 tex_m;\n"
9643 "attribute vec2 tex_masksample;\n"
9644 "varying float maskdiv_s;\n"
9645 "varying vec2 masktex_s[2];\n"
9646 "void main()\n"
9647 "{\n"
9648 " gl_Position = mvp * vertex;\n"
9649 " tex_c = tex_coord;\n"
9650 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
9651 " tex_s[1] = vec2( tex_sample.x, 0);\n"
9652 " div_s = vec4(2, 2, 2, 2);\n"
9653 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
9654 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
9655 " maskdiv_s = 2.0;\n"
9656 " 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"
9657 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
9658 "}\n";
9659Evas_GL_Program_Source shader_imgnat_21_mask12_nomul_vert_src =
9660{
9661 imgnat_21_mask12_nomul_vert_glsl,
9662 NULL, 0
9663};
9664
9665static const char imgnat_22_mask12_nomul_frag_glsl[] =
9666 "#ifdef GL_ES\n"
9667 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
9668 "precision highp float;\n"
9669 "#else\n"
9670 "precision mediump float;\n"
9671 "#endif\n"
9672 "#endif\n"
9673 "uniform sampler2D tex;\n"
9674 "varying vec2 tex_c;\n"
9675 "varying vec4 div_s;\n"
9676 "varying vec2 tex_s[4];\n"
9677 "uniform sampler2D texm;\n"
9678 "varying vec2 tex_m;\n"
9679 "varying float maskdiv_s;\n"
9680 "varying vec2 masktex_s[2];\n"
9681 "void main()\n"
9682 "{\n"
9683 " vec4 c;\n"
9684 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).bgra;\n"
9685 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).bgra;\n"
9686 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).bgra;\n"
9687 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).bgra;\n"
9688 " c = (col00 + col01 + col10 + col11) / div_s;\n"
9689 " float ma;\n"
9690 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
9691 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
9692 " ma = (ma00 + ma01) / maskdiv_s;\n"
9693 " gl_FragColor =\n"
9694 " c\n"
9695 " * ma\n"
9696 " ;\n"
9697 "}\n";
9698Evas_GL_Program_Source shader_imgnat_22_mask12_nomul_frag_src =
9699{
9700 imgnat_22_mask12_nomul_frag_glsl,
9701 NULL, 0
9702};
9703
9704static const char imgnat_22_mask12_nomul_vert_glsl[] =
9705 "#ifdef GL_ES\n"
9706 "precision highp float;\n"
9707 "#endif\n"
9708 "attribute vec4 vertex;\n"
9709 "uniform mat4 mvp;\n"
9710 "attribute vec2 tex_coord;\n"
9711 "varying vec2 tex_c;\n"
9712 "attribute vec2 tex_sample;\n"
9713 "varying vec4 div_s;\n"
9714 "varying vec2 tex_s[4];\n"
9715 "attribute vec4 mask_coord;\n"
9716 "varying vec2 tex_m;\n"
9717 "attribute vec2 tex_masksample;\n"
9718 "varying float maskdiv_s;\n"
9719 "varying vec2 masktex_s[2];\n"
9720 "void main()\n"
9721 "{\n"
9722 " gl_Position = mvp * vertex;\n"
9723 " tex_c = tex_coord;\n"
9724 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
9725 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
9726 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
9727 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
9728 " div_s = vec4(4, 4, 4, 4);\n"
9729 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
9730 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
9731 " maskdiv_s = 2.0;\n"
9732 " 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"
9733 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
9734 "}\n";
9735Evas_GL_Program_Source shader_imgnat_22_mask12_nomul_vert_src =
9736{
9737 imgnat_22_mask12_nomul_vert_glsl,
9738 NULL, 0
9739};
9740
9741static const char imgnat_12_bgra_mask12_nomul_frag_glsl[] =
9742 "#ifdef GL_ES\n"
9743 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
9744 "precision highp float;\n"
9745 "#else\n"
9746 "precision mediump float;\n"
9747 "#endif\n"
9748 "#endif\n"
9749 "uniform sampler2D tex;\n"
9750 "varying vec2 tex_c;\n"
9751 "varying vec4 div_s;\n"
9752 "varying vec2 tex_s[2];\n"
9753 "uniform sampler2D texm;\n"
9754 "varying vec2 tex_m;\n"
9755 "varying float maskdiv_s;\n"
9756 "varying vec2 masktex_s[2];\n"
9757 "void main()\n"
9758 "{\n"
9759 " vec4 c;\n"
9760 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).rgba;\n"
9761 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).rgba;\n"
9762 " c = (col00 + col01) / div_s;\n"
9763 " float ma;\n"
9764 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
9765 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
9766 " ma = (ma00 + ma01) / maskdiv_s;\n"
9767 " gl_FragColor =\n"
9768 " c\n"
9769 " * ma\n"
9770 " ;\n"
9771 "}\n";
9772Evas_GL_Program_Source shader_imgnat_12_bgra_mask12_nomul_frag_src =
9773{
9774 imgnat_12_bgra_mask12_nomul_frag_glsl,
9775 NULL, 0
9776};
9777
9778static const char imgnat_12_bgra_mask12_nomul_vert_glsl[] =
9779 "#ifdef GL_ES\n"
9780 "precision highp float;\n"
9781 "#endif\n"
9782 "attribute vec4 vertex;\n"
9783 "uniform mat4 mvp;\n"
9784 "attribute vec2 tex_coord;\n"
9785 "varying vec2 tex_c;\n"
9786 "attribute vec2 tex_sample;\n"
9787 "varying vec4 div_s;\n"
9788 "varying vec2 tex_s[2];\n"
9789 "attribute vec4 mask_coord;\n"
9790 "varying vec2 tex_m;\n"
9791 "attribute vec2 tex_masksample;\n"
9792 "varying float maskdiv_s;\n"
9793 "varying vec2 masktex_s[2];\n"
9794 "void main()\n"
9795 "{\n"
9796 " gl_Position = mvp * vertex;\n"
9797 " tex_c = tex_coord;\n"
9798 " tex_s[0] = vec2(0, -tex_sample.y);\n"
9799 " tex_s[1] = vec2(0, tex_sample.y);\n"
9800 " div_s = vec4(2, 2, 2, 2);\n"
9801 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
9802 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
9803 " maskdiv_s = 2.0;\n"
9804 " 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"
9805 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
9806 "}\n";
9807Evas_GL_Program_Source shader_imgnat_12_bgra_mask12_nomul_vert_src =
9808{
9809 imgnat_12_bgra_mask12_nomul_vert_glsl,
9810 NULL, 0
9811};
9812
9813static const char imgnat_21_bgra_mask12_nomul_frag_glsl[] =
9814 "#ifdef GL_ES\n"
9815 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
9816 "precision highp float;\n"
9817 "#else\n"
9818 "precision mediump float;\n"
9819 "#endif\n"
9820 "#endif\n"
9821 "uniform sampler2D tex;\n"
9822 "varying vec2 tex_c;\n"
9823 "varying vec4 div_s;\n"
9824 "varying vec2 tex_s[2];\n"
9825 "uniform sampler2D texm;\n"
9826 "varying vec2 tex_m;\n"
9827 "varying float maskdiv_s;\n"
9828 "varying vec2 masktex_s[2];\n"
9829 "void main()\n"
9830 "{\n"
9831 " vec4 c;\n"
9832 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).rgba;\n"
9833 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).rgba;\n"
9834 " c = (col00 + col01) / div_s;\n"
9835 " float ma;\n"
9836 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
9837 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
9838 " ma = (ma00 + ma01) / maskdiv_s;\n"
9839 " gl_FragColor =\n"
9840 " c\n"
9841 " * ma\n"
9842 " ;\n"
9843 "}\n";
9844Evas_GL_Program_Source shader_imgnat_21_bgra_mask12_nomul_frag_src =
9845{
9846 imgnat_21_bgra_mask12_nomul_frag_glsl,
9847 NULL, 0
9848};
9849
9850static const char imgnat_21_bgra_mask12_nomul_vert_glsl[] =
9851 "#ifdef GL_ES\n"
9852 "precision highp float;\n"
9853 "#endif\n"
9854 "attribute vec4 vertex;\n"
9855 "uniform mat4 mvp;\n"
9856 "attribute vec2 tex_coord;\n"
9857 "varying vec2 tex_c;\n"
9858 "attribute vec2 tex_sample;\n"
9859 "varying vec4 div_s;\n"
9860 "varying vec2 tex_s[2];\n"
9861 "attribute vec4 mask_coord;\n"
9862 "varying vec2 tex_m;\n"
9863 "attribute vec2 tex_masksample;\n"
9864 "varying float maskdiv_s;\n"
9865 "varying vec2 masktex_s[2];\n"
9866 "void main()\n"
9867 "{\n"
9868 " gl_Position = mvp * vertex;\n"
9869 " tex_c = tex_coord;\n"
9870 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
9871 " tex_s[1] = vec2( tex_sample.x, 0);\n"
9872 " div_s = vec4(2, 2, 2, 2);\n"
9873 " masktex_s[0] = vec2(0, -tex_masksample.y);\n"
9874 " masktex_s[1] = vec2(0, tex_masksample.y);\n"
9875 " maskdiv_s = 2.0;\n"
9876 " 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"
9877 " tex_m = mask_Position.xy * abs(mask_coord.zw) + mask_coord.xy;\n"
9878 "}\n";
9879Evas_GL_Program_Source shader_imgnat_21_bgra_mask12_nomul_vert_src =
9880{
9881 imgnat_21_bgra_mask12_nomul_vert_glsl,
9882 NULL, 0
9883};
9884
9885static const char imgnat_22_bgra_mask12_nomul_frag_glsl[] =
9886 "#ifdef GL_ES\n"
9887 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
9888 "precision highp float;\n"
9889 "#else\n"
9890 "precision mediump float;\n"
9891 "#endif\n"
9892 "#endif\n"
9893 "uniform sampler2D tex;\n"
9894 "varying vec2 tex_c;\n"
9895 "varying vec4 div_s;\n"
9896 "varying vec2 tex_s[4];\n"
9897 "uniform sampler2D texm;\n"
9898 "varying vec2 tex_m;\n"
9899 "varying float maskdiv_s;\n"
9900 "varying vec2 masktex_s[2];\n"
9901 "void main()\n"
9902 "{\n"
9903 " vec4 c;\n"
9904 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]).rgba;\n"
9905 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]).rgba;\n"
9906 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]).rgba;\n"
9907 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]).rgba;\n"
9908 " c = (col00 + col01 + col10 + col11) / div_s;\n"
9909 " float ma;\n"
9910 " float ma00 = texture2D(texm, tex_m + masktex_s[0]).a;\n"
9911 " float ma01 = texture2D(texm, tex_m + masktex_s[1]).a;\n"
9912 " ma = (ma00 + ma01) / maskdiv_s;\n"
9913 " gl_FragColor =\n"
9914 " c\n"
9915 " * ma\n"
9916 " ;\n"
9917 "}\n";
9918Evas_GL_Program_Source shader_imgnat_22_bgra_mask12_nomul_frag_src =
9919{
9920 imgnat_22_bgra_mask12_nomul_frag_glsl,
9921 NULL, 0
9922};
9923
9924static const char imgnat_22_bgra_mask12_nomul_vert_glsl[] =
9925 "#ifdef GL_ES\n"
9926 "precision highp float;\n"
9927 "#endif\n"
9928 "attribute vec4 vertex;\n"
9929 "uniform mat4 mvp;\n"
9930 "attribute vec2 tex_coord;\n"
9931 "varying vec2 tex_c;\n"
9932 "attribute vec2 tex_sample;\n"
9933 "varying vec4 div_s;\n"
9934 "varying vec2 tex_s[4];\n"
9935 "attribute vec4 mask_coord;\n"
9936 "varying vec2 tex_m;\n"
9937 "attribute vec2 tex_masksample;\n"
9938 "varying float maskdiv_s;\n"
9939