summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-11-14 09:41:15 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-11-14 10:01:30 +0900
commite18886a2a3c82adce0477f6a689c26ae62359502 (patch)
tree6be649fa73befbb8d6ac910a4211c945859d5549
parent70f645efe9918400bf56aa40455e7d109830a821 (diff)
Evas GL: Fix list of shaders to distribute
Some shader files (shd) were not included in EXTRA_DIST. This didn't break the build because the .x file was correctly generated. I guess the missing files in previous releases also had no impact because the .h files would be generated and shipped. Also generate the enum automagically. New shaders need to be added to Makefile_Evas.am.
-rw-r--r--src/Makefile_Evas.am31
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_common.h71
-rw-r--r--src/modules/evas/engines/gl_common/shader/evas_gl_enum.x48
-rw-r--r--src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x584
-rwxr-xr-xsrc/modules/evas/engines/gl_common/shader/gen_shaders.sh13
5 files changed, 379 insertions, 368 deletions
diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index 3e1f12987e..0ca771c7cf 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -577,7 +577,8 @@ modules/evas/engines/gl_common/evas_gl_core_private.h \
577modules/evas/engines/gl_common/evas_gl_api.c \ 577modules/evas/engines/gl_common/evas_gl_api.c \
578modules/evas/engines/gl_common/evas_gl_api_gles1.c \ 578modules/evas/engines/gl_common/evas_gl_api_gles1.c \
579modules/evas/engines/gl_common/evas_gl_api_ext.c \ 579modules/evas/engines/gl_common/evas_gl_api_ext.c \
580modules/evas/engines/gl_common/shader/evas_gl_shaders.x 580modules/evas/engines/gl_common/shader/evas_gl_shaders.x \
581modules/evas/engines/gl_common/shader/evas_gl_enum.x
581 582
582# 3D 583# 3D
583GL_COMMON_SOURCES += \ 584GL_COMMON_SOURCES += \
@@ -633,21 +634,37 @@ modules/evas/engines/gl_common/shader/rgb_a_pair_nomul_frag.shd \
633modules/evas/engines/gl_common/shader/rgb_a_pair_nomul_vert.shd \ 634modules/evas/engines/gl_common/shader/rgb_a_pair_nomul_vert.shd \
634modules/evas/engines/gl_common/shader/rgb_a_pair_vert.shd \ 635modules/evas/engines/gl_common/shader/rgb_a_pair_vert.shd \
635modules/evas/engines/gl_common/shader/tex_12_frag.shd \ 636modules/evas/engines/gl_common/shader/tex_12_frag.shd \
637modules/evas/engines/gl_common/shader/tex_12_vert.shd \
636modules/evas/engines/gl_common/shader/tex_12_nomul_frag.shd \ 638modules/evas/engines/gl_common/shader/tex_12_nomul_frag.shd \
637modules/evas/engines/gl_common/shader/tex_12_nomul_vert.shd \ 639modules/evas/engines/gl_common/shader/tex_12_nomul_vert.shd \
638modules/evas/engines/gl_common/shader/tex_12_vert.shd \
639modules/evas/engines/gl_common/shader/tex_21_frag.shd \ 640modules/evas/engines/gl_common/shader/tex_21_frag.shd \
641modules/evas/engines/gl_common/shader/tex_21_vert.shd \
640modules/evas/engines/gl_common/shader/tex_21_nomul_frag.shd \ 642modules/evas/engines/gl_common/shader/tex_21_nomul_frag.shd \
641modules/evas/engines/gl_common/shader/tex_21_nomul_vert.shd \ 643modules/evas/engines/gl_common/shader/tex_21_nomul_vert.shd \
642modules/evas/engines/gl_common/shader/tex_21_vert.shd \
643modules/evas/engines/gl_common/shader/tex_22_frag.shd \ 644modules/evas/engines/gl_common/shader/tex_22_frag.shd \
645modules/evas/engines/gl_common/shader/tex_22_vert.shd \
644modules/evas/engines/gl_common/shader/tex_22_nomul_frag.shd \ 646modules/evas/engines/gl_common/shader/tex_22_nomul_frag.shd \
645modules/evas/engines/gl_common/shader/tex_22_nomul_vert.shd \ 647modules/evas/engines/gl_common/shader/tex_22_nomul_vert.shd \
646modules/evas/engines/gl_common/shader/tex_22_vert.shd \
647modules/evas/engines/gl_common/shader/tex_frag.shd \ 648modules/evas/engines/gl_common/shader/tex_frag.shd \
649modules/evas/engines/gl_common/shader/tex_vert.shd \
648modules/evas/engines/gl_common/shader/tex_nomul_frag.shd \ 650modules/evas/engines/gl_common/shader/tex_nomul_frag.shd \
649modules/evas/engines/gl_common/shader/tex_nomul_vert.shd \ 651modules/evas/engines/gl_common/shader/tex_nomul_vert.shd \
650modules/evas/engines/gl_common/shader/tex_vert.shd \ 652modules/evas/engines/gl_common/shader/tex_afill_frag.shd \
653modules/evas/engines/gl_common/shader/tex_afill_vert.shd \
654modules/evas/engines/gl_common/shader/tex_22_afill_frag.shd \
655modules/evas/engines/gl_common/shader/tex_22_afill_vert.shd \
656modules/evas/engines/gl_common/shader/tex_21_afill_frag.shd \
657modules/evas/engines/gl_common/shader/tex_21_afill_vert.shd \
658modules/evas/engines/gl_common/shader/tex_12_afill_frag.shd \
659modules/evas/engines/gl_common/shader/tex_12_afill_vert.shd \
660modules/evas/engines/gl_common/shader/tex_22_nomul_afill_frag.shd \
661modules/evas/engines/gl_common/shader/tex_22_nomul_afill_vert.shd \
662modules/evas/engines/gl_common/shader/tex_21_nomul_afill_frag.shd \
663modules/evas/engines/gl_common/shader/tex_21_nomul_afill_vert.shd \
664modules/evas/engines/gl_common/shader/tex_12_nomul_afill_frag.shd \
665modules/evas/engines/gl_common/shader/tex_12_nomul_afill_vert.shd \
666modules/evas/engines/gl_common/shader/tex_nomul_afill_frag.shd \
667modules/evas/engines/gl_common/shader/tex_nomul_afill_vert.shd \
651modules/evas/engines/gl_common/shader/yuv_frag.shd \ 668modules/evas/engines/gl_common/shader/yuv_frag.shd \
652modules/evas/engines/gl_common/shader/yuv_nomul_frag.shd \ 669modules/evas/engines/gl_common/shader/yuv_nomul_frag.shd \
653modules/evas/engines/gl_common/shader/yuv_nomul_vert.shd \ 670modules/evas/engines/gl_common/shader/yuv_nomul_vert.shd \
@@ -663,7 +680,9 @@ $(GL_SHADERS_GEN)
663 680
664modules/evas/engines/gl_common/shader/evas_gl_shaders.x: modules/evas/engines/gl_common/shader/gen_shaders.sh $(GL_SHADERS_GEN) 681modules/evas/engines/gl_common/shader/evas_gl_shaders.x: modules/evas/engines/gl_common/shader/gen_shaders.sh $(GL_SHADERS_GEN)
665 @echo " SHADERS $@" 682 @echo " SHADERS $@"
666 @modules/evas/engines/gl_common/shader/gen_shaders.sh 683 @modules/evas/engines/gl_common/shader/gen_shaders.sh $(GL_SHADERS_GEN)
684
685modules/evas/engines/gl_common/shader/evas_gl_enum.x: modules/evas/engines/gl_common/shader/evas_gl_shaders.x
667 686
668GL_GENERIC_SOURCES = \ 687GL_GENERIC_SOURCES = \
669modules/evas/engines/gl_generic/evas_engine.c \ 688modules/evas/engines/gl_generic/evas_engine.c \
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 7ab6360301..6d82623200 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_common.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_common.h
@@ -286,75 +286,8 @@ typedef struct _Evas_GL_Texture_Async_Preload Evas_GL_Texture_Async_Preload;
286 286
287typedef Eina_Bool (*evas_gl_make_current_cb)(void *engine_data, void *doit); 287typedef Eina_Bool (*evas_gl_make_current_cb)(void *engine_data, void *doit);
288 288
289typedef enum { 289/* enum Evas_GL_Shader is defined below */
290 SHADER_RECT, 290#include "shader/evas_gl_enum.x"
291 SHADER_FONT,
292
293 SHADER_IMG,
294 SHADER_IMG_NOMUL,
295 SHADER_IMG_BGRA,
296 SHADER_IMG_BGRA_NOMUL,
297 SHADER_TEX,
298 SHADER_TEX_NOMUL,
299 SHADER_TEX_AFILL,
300 SHADER_TEX_NOMUL_AFILL,
301
302 SHADER_IMG_21,
303 SHADER_IMG_21_NOMUL,
304 SHADER_IMG_21_BGRA,
305 SHADER_IMG_21_BGRA_NOMUL,
306 SHADER_TEX_21,
307 SHADER_TEX_21_NOMUL,
308 SHADER_TEX_21_AFILL,
309 SHADER_TEX_21_NOMUL_AFILL,
310
311 SHADER_IMG_12,
312 SHADER_IMG_12_NOMUL,
313 SHADER_IMG_12_BGRA,
314 SHADER_IMG_12_BGRA_NOMUL,
315 SHADER_TEX_12,
316 SHADER_TEX_12_NOMUL,
317 SHADER_TEX_12_AFILL,
318 SHADER_TEX_12_NOMUL_AFILL,
319
320 SHADER_IMG_22,
321 SHADER_IMG_22_NOMUL,
322 SHADER_IMG_22_BGRA,
323 SHADER_IMG_22_BGRA_NOMUL,
324 SHADER_TEX_22,
325 SHADER_TEX_22_NOMUL,
326 SHADER_TEX_22_AFILL,
327 SHADER_TEX_22_NOMUL_AFILL,
328
329 SHADER_YUV,
330 SHADER_YUV_NOMUL,
331 SHADER_YUY2,
332 SHADER_YUY2_NOMUL,
333 SHADER_NV12,
334 SHADER_NV12_NOMUL,
335
336 SHADER_RGB_A_PAIR,
337 SHADER_RGB_A_PAIR_NOMUL,
338/*
339 SHADER_FILTER_INVERT,
340 SHADER_FILTER_INVERT_NOMUL,
341 SHADER_FILTER_INVERT_BGRA,
342 SHADER_FILTER_INVERT_BGRA_NOMUL,
343 SHADER_FILTER_GREYSCALE,
344 SHADER_FILTER_GREYSCALE_NOMUL,
345 SHADER_FILTER_GREYSCALE_BGRA,
346 SHADER_FILTER_GREYSCALE_BGRA_NOMUL,
347 SHADER_FILTER_SEPIA,
348 SHADER_FILTER_SEPIA_NOMUL,
349 SHADER_FILTER_SEPIA_BGRA,
350 SHADER_FILTER_SEPIA_BGRA_NOMUL,
351 */
352 /* SHADER_FILTER_BLUR, */
353 /* SHADER_FILTER_BLUR_NOMUL, */
354 /* SHADER_FILTER_BLUR_BGRA, */
355 /* SHADER_FILTER_BLUR_BGRA_NOMUL, */
356 SHADER_LAST
357} Evas_GL_Shader;
358 291
359struct _Evas_GL_Program 292struct _Evas_GL_Program
360{ 293{
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
new file mode 100644
index 0000000000..d2eea835b8
--- /dev/null
+++ b/src/modules/evas/engines/gl_common/shader/evas_gl_enum.x
@@ -0,0 +1,48 @@
1/* DO NOT MODIFY THIS FILE AS IT IS AUTO-GENERATED
2 * See: modules/evas/engines/gl_common/shader/gen_shaders.sh */
3
4typedef enum {
5 SHADER_FONT,
6 SHADER_IMG_12_BGRA_NOMUL,
7 SHADER_IMG_12_BGRA,
8 SHADER_IMG_12_NOMUL,
9 SHADER_IMG_12,
10 SHADER_IMG_21_BGRA_NOMUL,
11 SHADER_IMG_21_BGRA,
12 SHADER_IMG_21_NOMUL,
13 SHADER_IMG_21,
14 SHADER_IMG_22_BGRA_NOMUL,
15 SHADER_IMG_22_BGRA,
16 SHADER_IMG_22_NOMUL,
17 SHADER_IMG_22,
18 SHADER_IMG_BGRA_NOMUL,
19 SHADER_IMG_BGRA,
20 SHADER_IMG_NOMUL,
21 SHADER_IMG,
22 SHADER_NV12_NOMUL,
23 SHADER_NV12,
24 SHADER_RECT,
25 SHADER_RGB_A_PAIR_NOMUL,
26 SHADER_RGB_A_PAIR,
27 SHADER_TEX_12,
28 SHADER_TEX_12_NOMUL,
29 SHADER_TEX_21,
30 SHADER_TEX_21_NOMUL,
31 SHADER_TEX_22,
32 SHADER_TEX_22_NOMUL,
33 SHADER_TEX,
34 SHADER_TEX_NOMUL,
35 SHADER_TEX_AFILL,
36 SHADER_TEX_22_AFILL,
37 SHADER_TEX_21_AFILL,
38 SHADER_TEX_12_AFILL,
39 SHADER_TEX_22_NOMUL_AFILL,
40 SHADER_TEX_21_NOMUL_AFILL,
41 SHADER_TEX_12_NOMUL_AFILL,
42 SHADER_TEX_NOMUL_AFILL,
43 SHADER_YUV_NOMUL,
44 SHADER_YUV,
45 SHADER_YUY2_NOMUL,
46 SHADER_YUY2,
47 SHADER_LAST
48} Evas_GL_Shader;
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 9808a33f92..cb3f271521 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
@@ -1126,8 +1126,8 @@ Evas_GL_Program_Source shader_rgb_a_pair_vert_src =
1126 NULL, 0 1126 NULL, 0
1127}; 1127};
1128 1128
1129/* Source: modules/evas/engines/gl_common/shader/tex_12_afill_frag.shd */ 1129/* Source: modules/evas/engines/gl_common/shader/tex_12_frag.shd */
1130static const char tex_12_afill_frag_glsl[] = 1130static const char tex_12_frag_glsl[] =
1131 "#ifdef GL_ES\n" 1131 "#ifdef GL_ES\n"
1132 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n" 1132 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1133 "precision highp float;\n" 1133 "precision highp float;\n"
@@ -1144,17 +1144,16 @@ static const char tex_12_afill_frag_glsl[] =
1144 "{\n" 1144 "{\n"
1145 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n" 1145 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
1146 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n" 1146 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
1147 " vec4 c = (col00 + col01) / div_s;\n" 1147 " gl_FragColor = ((col00 + col01) / div_s) * col;\n"
1148 " gl_FragColor = vec4(c.r, c.g, c.b, 1) * col;\n"
1149 "}\n"; 1148 "}\n";
1150Evas_GL_Program_Source shader_tex_12_afill_frag_src = 1149Evas_GL_Program_Source shader_tex_12_frag_src =
1151{ 1150{
1152 tex_12_afill_frag_glsl, 1151 tex_12_frag_glsl,
1153 NULL, 0 1152 NULL, 0
1154}; 1153};
1155 1154
1156/* Source: modules/evas/engines/gl_common/shader/tex_12_afill_vert.shd */ 1155/* Source: modules/evas/engines/gl_common/shader/tex_12_vert.shd */
1157static const char tex_12_afill_vert_glsl[] = 1156static const char tex_12_vert_glsl[] =
1158 "#ifdef GL_ES\n" 1157 "#ifdef GL_ES\n"
1159 "precision highp float;\n" 1158 "precision highp float;\n"
1160 "#endif\n" 1159 "#endif\n"
@@ -1176,40 +1175,14 @@ static const char tex_12_afill_vert_glsl[] =
1176 " tex_s[1] = vec2(0, tex_sample.y);\n" 1175 " tex_s[1] = vec2(0, tex_sample.y);\n"
1177 " div_s = vec4(2, 2, 2, 2);\n" 1176 " div_s = vec4(2, 2, 2, 2);\n"
1178 "}\n"; 1177 "}\n";
1179Evas_GL_Program_Source shader_tex_12_afill_vert_src = 1178Evas_GL_Program_Source shader_tex_12_vert_src =
1180{
1181 tex_12_afill_vert_glsl,
1182 NULL, 0
1183};
1184
1185/* Source: modules/evas/engines/gl_common/shader/tex_12_frag.shd */
1186static const char tex_12_frag_glsl[] =
1187 "#ifdef GL_ES\n"
1188 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1189 "precision highp float;\n"
1190 "#else\n"
1191 "precision mediump float;\n"
1192 "#endif\n"
1193 "#endif\n"
1194 "uniform sampler2D tex;\n"
1195 "varying vec4 col;\n"
1196 "varying vec2 tex_c;\n"
1197 "varying vec2 tex_s[2];\n"
1198 "varying vec4 div_s;\n"
1199 "void main()\n"
1200 "{\n"
1201 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
1202 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
1203 " gl_FragColor = ((col00 + col01) / div_s) * col;\n"
1204 "}\n";
1205Evas_GL_Program_Source shader_tex_12_frag_src =
1206{ 1179{
1207 tex_12_frag_glsl, 1180 tex_12_vert_glsl,
1208 NULL, 0 1181 NULL, 0
1209}; 1182};
1210 1183
1211/* Source: modules/evas/engines/gl_common/shader/tex_12_nomul_afill_frag.shd */ 1184/* Source: modules/evas/engines/gl_common/shader/tex_12_nomul_frag.shd */
1212static const char tex_12_nomul_afill_frag_glsl[] = 1185static const char tex_12_nomul_frag_glsl[] =
1213 "#ifdef GL_ES\n" 1186 "#ifdef GL_ES\n"
1214 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n" 1187 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1215 "precision highp float;\n" 1188 "precision highp float;\n"
@@ -1225,17 +1198,16 @@ static const char tex_12_nomul_afill_frag_glsl[] =
1225 "{\n" 1198 "{\n"
1226 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n" 1199 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
1227 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n" 1200 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
1228 " vec4 c = (col00 + col01) / div_s;\n" 1201 " gl_FragColor = (col00 + col01) / div_s;\n"
1229 " gl_FragColor = vec4(c.r, c.g, c.b, 1);\n"
1230 "}\n"; 1202 "}\n";
1231Evas_GL_Program_Source shader_tex_12_nomul_afill_frag_src = 1203Evas_GL_Program_Source shader_tex_12_nomul_frag_src =
1232{ 1204{
1233 tex_12_nomul_afill_frag_glsl, 1205 tex_12_nomul_frag_glsl,
1234 NULL, 0 1206 NULL, 0
1235}; 1207};
1236 1208
1237/* Source: modules/evas/engines/gl_common/shader/tex_12_nomul_afill_vert.shd */ 1209/* Source: modules/evas/engines/gl_common/shader/tex_12_nomul_vert.shd */
1238static const char tex_12_nomul_afill_vert_glsl[] = 1210static const char tex_12_nomul_vert_glsl[] =
1239 "#ifdef GL_ES\n" 1211 "#ifdef GL_ES\n"
1240 "precision highp float;\n" 1212 "precision highp float;\n"
1241 "#endif\n" 1213 "#endif\n"
@@ -1254,14 +1226,14 @@ static const char tex_12_nomul_afill_vert_glsl[] =
1254 " tex_s[1] = vec2(0, tex_sample.y);\n" 1226 " tex_s[1] = vec2(0, tex_sample.y);\n"
1255 " div_s = vec4(2, 2, 2, 2);\n" 1227 " div_s = vec4(2, 2, 2, 2);\n"
1256 "}\n"; 1228 "}\n";
1257Evas_GL_Program_Source shader_tex_12_nomul_afill_vert_src = 1229Evas_GL_Program_Source shader_tex_12_nomul_vert_src =
1258{ 1230{
1259 tex_12_nomul_afill_vert_glsl, 1231 tex_12_nomul_vert_glsl,
1260 NULL, 0 1232 NULL, 0
1261}; 1233};
1262 1234
1263/* Source: modules/evas/engines/gl_common/shader/tex_12_nomul_frag.shd */ 1235/* Source: modules/evas/engines/gl_common/shader/tex_21_frag.shd */
1264static const char tex_12_nomul_frag_glsl[] = 1236static const char tex_21_frag_glsl[] =
1265 "#ifdef GL_ES\n" 1237 "#ifdef GL_ES\n"
1266 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n" 1238 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1267 "precision highp float;\n" 1239 "precision highp float;\n"
@@ -1270,6 +1242,7 @@ static const char tex_12_nomul_frag_glsl[] =
1270 "#endif\n" 1242 "#endif\n"
1271 "#endif\n" 1243 "#endif\n"
1272 "uniform sampler2D tex;\n" 1244 "uniform sampler2D tex;\n"
1245 "varying vec4 col;\n"
1273 "varying vec2 tex_c;\n" 1246 "varying vec2 tex_c;\n"
1274 "varying vec2 tex_s[2];\n" 1247 "varying vec2 tex_s[2];\n"
1275 "varying vec4 div_s;\n" 1248 "varying vec4 div_s;\n"
@@ -1277,71 +1250,96 @@ static const char tex_12_nomul_frag_glsl[] =
1277 "{\n" 1250 "{\n"
1278 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n" 1251 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
1279 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n" 1252 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
1280 " gl_FragColor = (col00 + col01) / div_s;\n" 1253 " gl_FragColor = ((col00 + col01) / div_s) * col;\n"
1281 "}\n"; 1254 "}\n";
1282Evas_GL_Program_Source shader_tex_12_nomul_frag_src = 1255Evas_GL_Program_Source shader_tex_21_frag_src =
1283{ 1256{
1284 tex_12_nomul_frag_glsl, 1257 tex_21_frag_glsl,
1285 NULL, 0 1258 NULL, 0
1286}; 1259};
1287 1260
1288/* Source: modules/evas/engines/gl_common/shader/tex_12_nomul_vert.shd */ 1261/* Source: modules/evas/engines/gl_common/shader/tex_21_vert.shd */
1289static const char tex_12_nomul_vert_glsl[] = 1262static const char tex_21_vert_glsl[] =
1290 "#ifdef GL_ES\n" 1263 "#ifdef GL_ES\n"
1291 "precision highp float;\n" 1264 "precision highp float;\n"
1292 "#endif\n" 1265 "#endif\n"
1293 "attribute vec4 vertex;\n" 1266 "attribute vec4 vertex;\n"
1267 "attribute vec4 color;\n"
1294 "attribute vec2 tex_coord;\n" 1268 "attribute vec2 tex_coord;\n"
1295 "attribute vec2 tex_sample;\n" 1269 "attribute vec2 tex_sample;\n"
1296 "uniform mat4 mvp;\n" 1270 "uniform mat4 mvp;\n"
1271 "varying vec4 col;\n"
1297 "varying vec2 tex_c;\n" 1272 "varying vec2 tex_c;\n"
1298 "varying vec2 tex_s[2];\n" 1273 "varying vec2 tex_s[2];\n"
1299 "varying vec4 div_s;\n" 1274 "varying vec4 div_s;\n"
1300 "void main()\n" 1275 "void main()\n"
1301 "{\n" 1276 "{\n"
1302 " gl_Position = mvp * vertex;\n" 1277 " gl_Position = mvp * vertex;\n"
1278 " col = color;\n"
1303 " tex_c = tex_coord;\n" 1279 " tex_c = tex_coord;\n"
1304 " tex_s[0] = vec2(0, -tex_sample.y);\n" 1280 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
1305 " tex_s[1] = vec2(0, tex_sample.y);\n" 1281 " tex_s[1] = vec2( tex_sample.x, 0);\n"
1306 " div_s = vec4(2, 2, 2, 2);\n" 1282 " div_s = vec4(2, 2, 2, 2);\n"
1307 "}\n"; 1283 "}\n";
1308Evas_GL_Program_Source shader_tex_12_nomul_vert_src = 1284Evas_GL_Program_Source shader_tex_21_vert_src =
1309{ 1285{
1310 tex_12_nomul_vert_glsl, 1286 tex_21_vert_glsl,
1311 NULL, 0 1287 NULL, 0
1312}; 1288};
1313 1289
1314/* Source: modules/evas/engines/gl_common/shader/tex_12_vert.shd */ 1290/* Source: modules/evas/engines/gl_common/shader/tex_21_nomul_frag.shd */
1315static const char tex_12_vert_glsl[] = 1291static const char tex_21_nomul_frag_glsl[] =
1292 "#ifdef GL_ES\n"
1293 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1294 "precision highp float;\n"
1295 "#else\n"
1296 "precision mediump float;\n"
1297 "#endif\n"
1298 "#endif\n"
1299 "uniform sampler2D tex;\n"
1300 "varying vec2 tex_c;\n"
1301 "varying vec2 tex_s[2];\n"
1302 "varying vec4 div_s;\n"
1303 "void main()\n"
1304 "{\n"
1305 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
1306 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
1307 " gl_FragColor = (col00 + col01) / div_s;\n"
1308 "}\n";
1309Evas_GL_Program_Source shader_tex_21_nomul_frag_src =
1310{
1311 tex_21_nomul_frag_glsl,
1312 NULL, 0
1313};
1314
1315/* Source: modules/evas/engines/gl_common/shader/tex_21_nomul_vert.shd */
1316static const char tex_21_nomul_vert_glsl[] =
1316 "#ifdef GL_ES\n" 1317 "#ifdef GL_ES\n"
1317 "precision highp float;\n" 1318 "precision highp float;\n"
1318 "#endif\n" 1319 "#endif\n"
1319 "attribute vec4 vertex;\n" 1320 "attribute vec4 vertex;\n"
1320 "attribute vec4 color;\n"
1321 "attribute vec2 tex_coord;\n" 1321 "attribute vec2 tex_coord;\n"
1322 "attribute vec2 tex_sample;\n" 1322 "attribute vec2 tex_sample;\n"
1323 "uniform mat4 mvp;\n" 1323 "uniform mat4 mvp;\n"
1324 "varying vec4 col;\n"
1325 "varying vec2 tex_c;\n" 1324 "varying vec2 tex_c;\n"
1326 "varying vec2 tex_s[2];\n" 1325 "varying vec2 tex_s[2];\n"
1327 "varying vec4 div_s;\n" 1326 "varying vec4 div_s;\n"
1328 "void main()\n" 1327 "void main()\n"
1329 "{\n" 1328 "{\n"
1330 " gl_Position = mvp * vertex;\n" 1329 " gl_Position = mvp * vertex;\n"
1331 " col = color;\n"
1332 " tex_c = tex_coord;\n" 1330 " tex_c = tex_coord;\n"
1333 " tex_s[0] = vec2(0, -tex_sample.y);\n" 1331 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
1334 " tex_s[1] = vec2(0, tex_sample.y);\n" 1332 " tex_s[1] = vec2( tex_sample.x, 0);\n"
1335 " div_s = vec4(2, 2, 2, 2);\n" 1333 " div_s = vec4(2, 2, 2, 2);\n"
1336 "}\n"; 1334 "}\n";
1337Evas_GL_Program_Source shader_tex_12_vert_src = 1335Evas_GL_Program_Source shader_tex_21_nomul_vert_src =
1338{ 1336{
1339 tex_12_vert_glsl, 1337 tex_21_nomul_vert_glsl,
1340 NULL, 0 1338 NULL, 0
1341}; 1339};
1342 1340
1343/* Source: modules/evas/engines/gl_common/shader/tex_21_afill_frag.shd */ 1341/* Source: modules/evas/engines/gl_common/shader/tex_22_frag.shd */
1344static const char tex_21_afill_frag_glsl[] = 1342static const char tex_22_frag_glsl[] =
1345 "#ifdef GL_ES\n" 1343 "#ifdef GL_ES\n"
1346 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n" 1344 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1347 "precision highp float;\n" 1345 "precision highp float;\n"
@@ -1352,23 +1350,24 @@ static const char tex_21_afill_frag_glsl[] =
1352 "uniform sampler2D tex;\n" 1350 "uniform sampler2D tex;\n"
1353 "varying vec4 col;\n" 1351 "varying vec4 col;\n"
1354 "varying vec2 tex_c;\n" 1352 "varying vec2 tex_c;\n"
1355 "varying vec2 tex_s[2];\n" 1353 "varying vec2 tex_s[4];\n"
1356 "varying vec4 div_s;\n" 1354 "varying vec4 div_s;\n"
1357 "void main()\n" 1355 "void main()\n"
1358 "{\n" 1356 "{\n"
1359 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n" 1357 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
1360 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n" 1358 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
1361 " vec4 c = (col00 + col01) / div_s;\n" 1359 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]);\n"
1362 " gl_FragColor = vec4(c.r, c.g, c.b, 1) * col;\n" 1360 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]);\n"
1361 " gl_FragColor = ((col00 + col01 + col10 + col11) / div_s) * col;\n"
1363 "}\n"; 1362 "}\n";
1364Evas_GL_Program_Source shader_tex_21_afill_frag_src = 1363Evas_GL_Program_Source shader_tex_22_frag_src =
1365{ 1364{
1366 tex_21_afill_frag_glsl, 1365 tex_22_frag_glsl,
1367 NULL, 0 1366 NULL, 0
1368}; 1367};
1369 1368
1370/* Source: modules/evas/engines/gl_common/shader/tex_21_afill_vert.shd */ 1369/* Source: modules/evas/engines/gl_common/shader/tex_22_vert.shd */
1371static const char tex_21_afill_vert_glsl[] = 1370static const char tex_22_vert_glsl[] =
1372 "#ifdef GL_ES\n" 1371 "#ifdef GL_ES\n"
1373 "precision highp float;\n" 1372 "precision highp float;\n"
1374 "#endif\n" 1373 "#endif\n"
@@ -1379,25 +1378,27 @@ static const char tex_21_afill_vert_glsl[] =
1379 "uniform mat4 mvp;\n" 1378 "uniform mat4 mvp;\n"
1380 "varying vec4 col;\n" 1379 "varying vec4 col;\n"
1381 "varying vec2 tex_c;\n" 1380 "varying vec2 tex_c;\n"
1382 "varying vec2 tex_s[2];\n" 1381 "varying vec2 tex_s[4];\n"
1383 "varying vec4 div_s;\n" 1382 "varying vec4 div_s;\n"
1384 "void main()\n" 1383 "void main()\n"
1385 "{\n" 1384 "{\n"
1386 " gl_Position = mvp * vertex;\n" 1385 " gl_Position = mvp * vertex;\n"
1387 " col = color;\n" 1386 " col = color;\n"
1388 " tex_c = tex_coord;\n" 1387 " tex_c = tex_coord;\n"
1389 " tex_s[0] = vec2(-tex_sample.x, 0);\n" 1388 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
1390 " tex_s[1] = vec2( tex_sample.x, 0);\n" 1389 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
1391 " div_s = vec4(2, 2, 2, 2);\n" 1390 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
1391 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
1392 " div_s = vec4(4, 4, 4, 4);\n"
1392 "}\n"; 1393 "}\n";
1393Evas_GL_Program_Source shader_tex_21_afill_vert_src = 1394Evas_GL_Program_Source shader_tex_22_vert_src =
1394{ 1395{
1395 tex_21_afill_vert_glsl, 1396 tex_22_vert_glsl,
1396 NULL, 0 1397 NULL, 0
1397}; 1398};
1398 1399
1399/* Source: modules/evas/engines/gl_common/shader/tex_21_frag.shd */ 1400/* Source: modules/evas/engines/gl_common/shader/tex_22_nomul_frag.shd */
1400static const char tex_21_frag_glsl[] = 1401static const char tex_22_nomul_frag_glsl[] =
1401 "#ifdef GL_ES\n" 1402 "#ifdef GL_ES\n"
1402 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n" 1403 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1403 "precision highp float;\n" 1404 "precision highp float;\n"
@@ -1406,24 +1407,53 @@ static const char tex_21_frag_glsl[] =
1406 "#endif\n" 1407 "#endif\n"
1407 "#endif\n" 1408 "#endif\n"
1408 "uniform sampler2D tex;\n" 1409 "uniform sampler2D tex;\n"
1409 "varying vec4 col;\n"
1410 "varying vec2 tex_c;\n" 1410 "varying vec2 tex_c;\n"
1411 "varying vec2 tex_s[2];\n" 1411 "varying vec2 tex_s[4];\n"
1412 "varying vec4 div_s;\n" 1412 "varying vec4 div_s;\n"
1413 "void main()\n" 1413 "void main()\n"
1414 "{\n" 1414 "{\n"
1415 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n" 1415 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
1416 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n" 1416 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
1417 " gl_FragColor = ((col00 + col01) / div_s) * col;\n" 1417 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]);\n"
1418 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]);\n"
1419 " gl_FragColor = (col00 + col01 + col10 + col11) / div_s;\n"
1418 "}\n"; 1420 "}\n";
1419Evas_GL_Program_Source shader_tex_21_frag_src = 1421Evas_GL_Program_Source shader_tex_22_nomul_frag_src =
1420{ 1422{
1421 tex_21_frag_glsl, 1423 tex_22_nomul_frag_glsl,
1422 NULL, 0 1424 NULL, 0
1423}; 1425};
1424 1426
1425/* Source: modules/evas/engines/gl_common/shader/tex_21_nomul_afill_frag.shd */ 1427/* Source: modules/evas/engines/gl_common/shader/tex_22_nomul_vert.shd */
1426static const char tex_21_nomul_afill_frag_glsl[] = 1428static const char tex_22_nomul_vert_glsl[] =
1429 "#ifdef GL_ES\n"
1430 "precision highp float;\n"
1431 "#endif\n"
1432 "attribute vec4 vertex;\n"
1433 "attribute vec2 tex_coord;\n"
1434 "attribute vec2 tex_sample;\n"
1435 "uniform mat4 mvp;\n"
1436 "varying vec2 tex_c;\n"
1437 "varying vec2 tex_s[4];\n"
1438 "varying vec4 div_s;\n"
1439 "void main()\n"
1440 "{\n"
1441 " gl_Position = mvp * vertex;\n"
1442 " tex_c = tex_coord;\n"
1443 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
1444 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
1445 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
1446 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
1447 " div_s = vec4(4, 4, 4, 4);\n"
1448 "}\n";
1449Evas_GL_Program_Source shader_tex_22_nomul_vert_src =
1450{
1451 tex_22_nomul_vert_glsl,
1452 NULL, 0
1453};
1454
1455/* Source: modules/evas/engines/gl_common/shader/tex_frag.shd */
1456static const char tex_frag_glsl[] =
1427 "#ifdef GL_ES\n" 1457 "#ifdef GL_ES\n"
1428 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n" 1458 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1429 "precision highp float;\n" 1459 "precision highp float;\n"
@@ -1432,50 +1462,43 @@ static const char tex_21_nomul_afill_frag_glsl[] =
1432 "#endif\n" 1462 "#endif\n"
1433 "#endif\n" 1463 "#endif\n"
1434 "uniform sampler2D tex;\n" 1464 "uniform sampler2D tex;\n"
1465 "varying vec4 col;\n"
1435 "varying vec2 tex_c;\n" 1466 "varying vec2 tex_c;\n"
1436 "varying vec2 tex_s[2];\n"
1437 "varying vec4 div_s;\n"
1438 "void main()\n" 1467 "void main()\n"
1439 "{\n" 1468 "{\n"
1440 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n" 1469 " gl_FragColor = texture2D(tex, tex_c.xy) * col;\n"
1441 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
1442 " vec4 c = (col00 + col01) / div_s;\n"
1443 " gl_FragColor = vec4(c.r, c.g, c.b, 1);\n"
1444 "}\n"; 1470 "}\n";
1445Evas_GL_Program_Source shader_tex_21_nomul_afill_frag_src = 1471Evas_GL_Program_Source shader_tex_frag_src =
1446{ 1472{
1447 tex_21_nomul_afill_frag_glsl, 1473 tex_frag_glsl,
1448 NULL, 0 1474 NULL, 0
1449}; 1475};
1450 1476
1451/* Source: modules/evas/engines/gl_common/shader/tex_21_nomul_afill_vert.shd */ 1477/* Source: modules/evas/engines/gl_common/shader/tex_vert.shd */
1452static const char tex_21_nomul_afill_vert_glsl[] = 1478static const char tex_vert_glsl[] =
1453 "#ifdef GL_ES\n" 1479 "#ifdef GL_ES\n"
1454 "precision highp float;\n" 1480 "precision highp float;\n"
1455 "#endif\n" 1481 "#endif\n"
1456 "attribute vec4 vertex;\n" 1482 "attribute vec4 vertex;\n"
1483 "attribute vec4 color;\n"
1457 "attribute vec2 tex_coord;\n" 1484 "attribute vec2 tex_coord;\n"
1458 "attribute vec2 tex_sample;\n"
1459 "uniform mat4 mvp;\n" 1485 "uniform mat4 mvp;\n"
1486 "varying vec4 col;\n"
1460 "varying vec2 tex_c;\n" 1487 "varying vec2 tex_c;\n"
1461 "varying vec2 tex_s[2];\n"
1462 "varying vec4 div_s;\n"
1463 "void main()\n" 1488 "void main()\n"
1464 "{\n" 1489 "{\n"
1465 " gl_Position = mvp * vertex;\n" 1490 " gl_Position = mvp * vertex;\n"
1491 " col = color;\n"
1466 " tex_c = tex_coord;\n" 1492 " tex_c = tex_coord;\n"
1467 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
1468 " tex_s[1] = vec2( tex_sample.x, 0);\n"
1469 " div_s = vec4(2, 2, 2, 2);\n"
1470 "}\n"; 1493 "}\n";
1471Evas_GL_Program_Source shader_tex_21_nomul_afill_vert_src = 1494Evas_GL_Program_Source shader_tex_vert_src =
1472{ 1495{
1473 tex_21_nomul_afill_vert_glsl, 1496 tex_vert_glsl,
1474 NULL, 0 1497 NULL, 0
1475}; 1498};
1476 1499
1477/* Source: modules/evas/engines/gl_common/shader/tex_21_nomul_frag.shd */ 1500/* Source: modules/evas/engines/gl_common/shader/tex_nomul_frag.shd */
1478static const char tex_21_nomul_frag_glsl[] = 1501static const char tex_nomul_frag_glsl[] =
1479 "#ifdef GL_ES\n" 1502 "#ifdef GL_ES\n"
1480 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n" 1503 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1481 "precision highp float;\n" 1504 "precision highp float;\n"
@@ -1485,72 +1508,79 @@ static const char tex_21_nomul_frag_glsl[] =
1485 "#endif\n" 1508 "#endif\n"
1486 "uniform sampler2D tex;\n" 1509 "uniform sampler2D tex;\n"
1487 "varying vec2 tex_c;\n" 1510 "varying vec2 tex_c;\n"
1488 "varying vec2 tex_s[2];\n"
1489 "varying vec4 div_s;\n"
1490 "void main()\n" 1511 "void main()\n"
1491 "{\n" 1512 "{\n"
1492 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n" 1513 " gl_FragColor = texture2D(tex, tex_c.xy);\n"
1493 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
1494 " gl_FragColor = (col00 + col01) / div_s;\n"
1495 "}\n"; 1514 "}\n";
1496Evas_GL_Program_Source shader_tex_21_nomul_frag_src = 1515Evas_GL_Program_Source shader_tex_nomul_frag_src =
1497{ 1516{
1498 tex_21_nomul_frag_glsl, 1517 tex_nomul_frag_glsl,
1499 NULL, 0 1518 NULL, 0
1500}; 1519};
1501 1520
1502/* Source: modules/evas/engines/gl_common/shader/tex_21_nomul_vert.shd */ 1521/* Source: modules/evas/engines/gl_common/shader/tex_nomul_vert.shd */
1503static const char tex_21_nomul_vert_glsl[] = 1522static const char tex_nomul_vert_glsl[] =
1504 "#ifdef GL_ES\n" 1523 "#ifdef GL_ES\n"
1505 "precision highp float;\n" 1524 "precision highp float;\n"
1506 "#endif\n" 1525 "#endif\n"
1507 "attribute vec4 vertex;\n" 1526 "attribute vec4 vertex;\n"
1508 "attribute vec2 tex_coord;\n" 1527 "attribute vec2 tex_coord;\n"
1509 "attribute vec2 tex_sample;\n"
1510 "uniform mat4 mvp;\n" 1528 "uniform mat4 mvp;\n"
1511 "varying vec2 tex_c;\n" 1529 "varying vec2 tex_c;\n"
1512 "varying vec2 tex_s[2];\n"
1513 "varying vec4 div_s;\n"
1514 "void main()\n" 1530 "void main()\n"
1515 "{\n" 1531 "{\n"
1516 " gl_Position = mvp * vertex;\n" 1532 " gl_Position = mvp * vertex;\n"
1517 " tex_c = tex_coord;\n" 1533 " tex_c = tex_coord;\n"
1518 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
1519 " tex_s[1] = vec2( tex_sample.x, 0);\n"
1520 " div_s = vec4(2, 2, 2, 2);\n"
1521 "}\n"; 1534 "}\n";
1522Evas_GL_Program_Source shader_tex_21_nomul_vert_src = 1535Evas_GL_Program_Source shader_tex_nomul_vert_src =
1523{ 1536{
1524 tex_21_nomul_vert_glsl, 1537 tex_nomul_vert_glsl,
1525 NULL, 0 1538 NULL, 0
1526}; 1539};
1527 1540
1528/* Source: modules/evas/engines/gl_common/shader/tex_21_vert.shd */ 1541/* Source: modules/evas/engines/gl_common/shader/tex_afill_frag.shd */
1529static const char tex_21_vert_glsl[] = 1542static const char tex_afill_frag_glsl[] =
1543 "#ifdef GL_ES\n"
1544 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1545 "precision highp float;\n"
1546 "#else\n"
1547 "precision mediump float;\n"
1548 "#endif\n"
1549 "#endif\n"
1550 "uniform sampler2D tex;\n"
1551 "varying vec4 col;\n"
1552 "varying vec2 tex_c;\n"
1553 "void main()\n"
1554 "{\n"
1555 " vec4 c = texture2D(tex, tex_c.xy);\n"
1556 " gl_FragColor = vec4(c.r, c.g, c.b, 1) * col;\n"
1557 "}\n";
1558Evas_GL_Program_Source shader_tex_afill_frag_src =
1559{
1560 tex_afill_frag_glsl,
1561 NULL, 0
1562};
1563
1564/* Source: modules/evas/engines/gl_common/shader/tex_afill_vert.shd */
1565static const char tex_afill_vert_glsl[] =
1530 "#ifdef GL_ES\n" 1566 "#ifdef GL_ES\n"
1531 "precision highp float;\n" 1567 "precision highp float;\n"
1532 "#endif\n" 1568 "#endif\n"
1533 "attribute vec4 vertex;\n" 1569 "attribute vec4 vertex;\n"
1534 "attribute vec4 color;\n" 1570 "attribute vec4 color;\n"
1535 "attribute vec2 tex_coord;\n" 1571 "attribute vec2 tex_coord;\n"
1536 "attribute vec2 tex_sample;\n"
1537 "uniform mat4 mvp;\n" 1572 "uniform mat4 mvp;\n"
1538 "varying vec4 col;\n" 1573 "varying vec4 col;\n"
1539 "varying vec2 tex_c;\n" 1574 "varying vec2 tex_c;\n"
1540 "varying vec2 tex_s[2];\n"
1541 "varying vec4 div_s;\n"
1542 "void main()\n" 1575 "void main()\n"
1543 "{\n" 1576 "{\n"
1544 " gl_Position = mvp * vertex;\n" 1577 " gl_Position = mvp * vertex;\n"
1545 " col = color;\n" 1578 " col = color;\n"
1546 " tex_c = tex_coord;\n" 1579 " tex_c = tex_coord;\n"
1547 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
1548 " tex_s[1] = vec2( tex_sample.x, 0);\n"
1549 " div_s = vec4(2, 2, 2, 2);\n"
1550 "}\n"; 1580 "}\n";
1551Evas_GL_Program_Source shader_tex_21_vert_src = 1581Evas_GL_Program_Source shader_tex_afill_vert_src =
1552{ 1582{
1553 tex_21_vert_glsl, 1583 tex_afill_vert_glsl,
1554 NULL, 0 1584 NULL, 0
1555}; 1585};
1556 1586
@@ -1614,8 +1644,8 @@ Evas_GL_Program_Source shader_tex_22_afill_vert_src =
1614 NULL, 0 1644 NULL, 0
1615}; 1645};
1616 1646
1617/* Source: modules/evas/engines/gl_common/shader/tex_22_frag.shd */ 1647/* Source: modules/evas/engines/gl_common/shader/tex_21_afill_frag.shd */
1618static const char tex_22_frag_glsl[] = 1648static const char tex_21_afill_frag_glsl[] =
1619 "#ifdef GL_ES\n" 1649 "#ifdef GL_ES\n"
1620 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n" 1650 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1621 "precision highp float;\n" 1651 "precision highp float;\n"
@@ -1626,24 +1656,52 @@ static const char tex_22_frag_glsl[] =
1626 "uniform sampler2D tex;\n" 1656 "uniform sampler2D tex;\n"
1627 "varying vec4 col;\n" 1657 "varying vec4 col;\n"
1628 "varying vec2 tex_c;\n" 1658 "varying vec2 tex_c;\n"
1629 "varying vec2 tex_s[4];\n" 1659 "varying vec2 tex_s[2];\n"
1630 "varying vec4 div_s;\n" 1660 "varying vec4 div_s;\n"
1631 "void main()\n" 1661 "void main()\n"
1632 "{\n" 1662 "{\n"
1633 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n" 1663 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
1634 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n" 1664 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
1635 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]);\n" 1665 " vec4 c = (col00 + col01) / div_s;\n"
1636 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]);\n" 1666 " gl_FragColor = vec4(c.r, c.g, c.b, 1) * col;\n"
1637 " gl_FragColor = ((col00 + col01 + col10 + col11) / div_s) * col;\n"
1638 "}\n"; 1667 "}\n";
1639Evas_GL_Program_Source shader_tex_22_frag_src = 1668Evas_GL_Program_Source shader_tex_21_afill_frag_src =
1640{ 1669{
1641 tex_22_frag_glsl, 1670 tex_21_afill_frag_glsl,
1642 NULL, 0 1671 NULL, 0
1643}; 1672};
1644 1673
1645/* Source: modules/evas/engines/gl_common/shader/tex_22_nomul_afill_frag.shd */ 1674/* Source: modules/evas/engines/gl_common/shader/tex_21_afill_vert.shd */
1646static const char tex_22_nomul_afill_frag_glsl[] = 1675static const char tex_21_afill_vert_glsl[] =
1676 "#ifdef GL_ES\n"
1677 "precision highp float;\n"
1678 "#endif\n"
1679 "attribute vec4 vertex;\n"
1680 "attribute vec4 color;\n"
1681 "attribute vec2 tex_coord;\n"
1682 "attribute vec2 tex_sample;\n"
1683 "uniform mat4 mvp;\n"
1684 "varying vec4 col;\n"
1685 "varying vec2 tex_c;\n"
1686 "varying vec2 tex_s[2];\n"
1687 "varying vec4 div_s;\n"
1688 "void main()\n"
1689 "{\n"
1690 " gl_Position = mvp * vertex;\n"
1691 " col = color;\n"
1692 " tex_c = tex_coord;\n"
1693 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
1694 " tex_s[1] = vec2( tex_sample.x, 0);\n"
1695 " div_s = vec4(2, 2, 2, 2);\n"
1696 "}\n";
1697Evas_GL_Program_Source shader_tex_21_afill_vert_src =
1698{
1699 tex_21_afill_vert_glsl,
1700 NULL, 0
1701};
1702
1703/* Source: modules/evas/engines/gl_common/shader/tex_12_afill_frag.shd */
1704static const char tex_12_afill_frag_glsl[] =
1647 "#ifdef GL_ES\n" 1705 "#ifdef GL_ES\n"
1648 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n" 1706 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1649 "precision highp float;\n" 1707 "precision highp float;\n"
@@ -1652,54 +1710,54 @@ static const char tex_22_nomul_afill_frag_glsl[] =
1652 "#endif\n" 1710 "#endif\n"
1653 "#endif\n" 1711 "#endif\n"
1654 "uniform sampler2D tex;\n" 1712 "uniform sampler2D tex;\n"
1713 "varying vec4 col;\n"
1655 "varying vec2 tex_c;\n" 1714 "varying vec2 tex_c;\n"
1656 "varying vec2 tex_s[4];\n" 1715 "varying vec2 tex_s[2];\n"
1657 "varying vec4 div_s;\n" 1716 "varying vec4 div_s;\n"
1658 "void main()\n" 1717 "void main()\n"
1659 "{\n" 1718 "{\n"
1660 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n" 1719 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
1661 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n" 1720 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
1662 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]);\n" 1721 " vec4 c = (col00 + col01) / div_s;\n"
1663 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]);\n" 1722 " gl_FragColor = vec4(c.r, c.g, c.b, 1) * col;\n"
1664 " vec4 c = (col00 + col01 + col10 + col11) / div_s;\n"
1665 " gl_FragColor = vec4(c.r, c.g, c.b, 1);\n"
1666 "}\n"; 1723 "}\n";
1667Evas_GL_Program_Source shader_tex_22_nomul_afill_frag_src = 1724Evas_GL_Program_Source shader_tex_12_afill_frag_src =
1668{ 1725{
1669 tex_22_nomul_afill_frag_glsl, 1726 tex_12_afill_frag_glsl,
1670 NULL, 0 1727 NULL, 0
1671}; 1728};
1672 1729
1673/* Source: modules/evas/engines/gl_common/shader/tex_22_nomul_afill_vert.shd */ 1730/* Source: modules/evas/engines/gl_common/shader/tex_12_afill_vert.shd */
1674static const char tex_22_nomul_afill_vert_glsl[] = 1731static const char tex_12_afill_vert_glsl[] =
1675 "#ifdef GL_ES\n" 1732 "#ifdef GL_ES\n"
1676 "precision highp float;\n" 1733 "precision highp float;\n"
1677 "#endif\n" 1734 "#endif\n"
1678 "attribute vec4 vertex;\n" 1735 "attribute vec4 vertex;\n"
1736 "attribute vec4 color;\n"
1679 "attribute vec2 tex_coord;\n" 1737 "attribute vec2 tex_coord;\n"
1680 "attribute vec2 tex_sample;\n" 1738 "attribute vec2 tex_sample;\n"
1681 "uniform mat4 mvp;\n" 1739 "uniform mat4 mvp;\n"
1740 "varying vec4 col;\n"
1682 "varying vec2 tex_c;\n" 1741 "varying vec2 tex_c;\n"
1683 "varying vec2 tex_s[4];\n" 1742 "varying vec2 tex_s[2];\n"
1684 "varying vec4 div_s;\n" 1743 "varying vec4 div_s;\n"
1685 "void main()\n" 1744 "void main()\n"
1686 "{\n" 1745 "{\n"
1687 " gl_Position = mvp * vertex;\n" 1746 " gl_Position = mvp * vertex;\n"
1747 " col = color;\n"
1688 " tex_c = tex_coord;\n" 1748 " tex_c = tex_coord;\n"
1689 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n" 1749 " tex_s[0] = vec2(0, -tex_sample.y);\n"
1690 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n" 1750 " tex_s[1] = vec2(0, tex_sample.y);\n"
1691 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n" 1751 " div_s = vec4(2, 2, 2, 2);\n"
1692 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
1693 " div_s = vec4(4, 4, 4, 4);\n"
1694 "}\n"; 1752 "}\n";
1695Evas_GL_Program_Source shader_tex_22_nomul_afill_vert_src = 1753Evas_GL_Program_Source shader_tex_12_afill_vert_src =
1696{ 1754{
1697 tex_22_nomul_afill_vert_glsl, 1755 tex_12_afill_vert_glsl,
1698 NULL, 0 1756 NULL, 0
1699}; 1757};
1700 1758
1701/* Source: modules/evas/engines/gl_common/shader/tex_22_nomul_frag.shd */ 1759/* Source: modules/evas/engines/gl_common/shader/tex_22_nomul_afill_frag.shd */
1702static const char tex_22_nomul_frag_glsl[] = 1760static const char tex_22_nomul_afill_frag_glsl[] =
1703 "#ifdef GL_ES\n" 1761 "#ifdef GL_ES\n"
1704 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n" 1762 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1705 "precision highp float;\n" 1763 "precision highp float;\n"
@@ -1717,60 +1775,30 @@ static const char tex_22_nomul_frag_glsl[] =
1717 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n" 1775 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
1718 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]);\n" 1776 " vec4 col10 = texture2D(tex, tex_c + tex_s[2]);\n"
1719 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]);\n" 1777 " vec4 col11 = texture2D(tex, tex_c + tex_s[3]);\n"
1720 " gl_FragColor = (col00 + col01 + col10 + col11) / div_s;\n" 1778 " vec4 c = (col00 + col01 + col10 + col11) / div_s;\n"
1721 "}\n"; 1779 " gl_FragColor = vec4(c.r, c.g, c.b, 1);\n"
1722Evas_GL_Program_Source shader_tex_22_nomul_frag_src =
1723{
1724 tex_22_nomul_frag_glsl,
1725 NULL, 0
1726};
1727
1728/* Source: modules/evas/engines/gl_common/shader/tex_22_nomul_vert.shd */
1729static const char tex_22_nomul_vert_glsl[] =
1730 "#ifdef GL_ES\n"
1731 "precision highp float;\n"
1732 "#endif\n"
1733 "attribute vec4 vertex;\n"
1734 "attribute vec2 tex_coord;\n"
1735 "attribute vec2 tex_sample;\n"
1736 "uniform mat4 mvp;\n"
1737 "varying vec2 tex_c;\n"
1738 "varying vec2 tex_s[4];\n"
1739 "varying vec4 div_s;\n"
1740 "void main()\n"
1741 "{\n"
1742 " gl_Position = mvp * vertex;\n"
1743 " tex_c = tex_coord;\n"
1744 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
1745 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
1746 " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
1747 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
1748 " div_s = vec4(4, 4, 4, 4);\n"
1749 "}\n"; 1780 "}\n";
1750Evas_GL_Program_Source shader_tex_22_nomul_vert_src = 1781Evas_GL_Program_Source shader_tex_22_nomul_afill_frag_src =
1751{ 1782{
1752 tex_22_nomul_vert_glsl, 1783 tex_22_nomul_afill_frag_glsl,
1753 NULL, 0 1784 NULL, 0
1754}; 1785};
1755 1786
1756/* Source: modules/evas/engines/gl_common/shader/tex_22_vert.shd */ 1787/* Source: modules/evas/engines/gl_common/shader/tex_22_nomul_afill_vert.shd */
1757static const char tex_22_vert_glsl[] = 1788static const char tex_22_nomul_afill_vert_glsl[] =
1758 "#ifdef GL_ES\n" 1789 "#ifdef GL_ES\n"
1759 "precision highp float;\n" 1790 "precision highp float;\n"
1760 "#endif\n" 1791 "#endif\n"
1761 "attribute vec4 vertex;\n" 1792 "attribute vec4 vertex;\n"
1762 "attribute vec4 color;\n"
1763 "attribute vec2 tex_coord;\n" 1793 "attribute vec2 tex_coord;\n"
1764 "attribute vec2 tex_sample;\n" 1794 "attribute vec2 tex_sample;\n"
1765 "uniform mat4 mvp;\n" 1795 "uniform mat4 mvp;\n"
1766 "varying vec4 col;\n"
1767 "varying vec2 tex_c;\n" 1796 "varying vec2 tex_c;\n"
1768 "varying vec2 tex_s[4];\n" 1797 "varying vec2 tex_s[4];\n"
1769 "varying vec4 div_s;\n" 1798 "varying vec4 div_s;\n"
1770 "void main()\n" 1799 "void main()\n"
1771 "{\n" 1800 "{\n"
1772 " gl_Position = mvp * vertex;\n" 1801 " gl_Position = mvp * vertex;\n"
1773 " col = color;\n"
1774 " tex_c = tex_coord;\n" 1802 " tex_c = tex_coord;\n"
1775 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n" 1803 " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
1776 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n" 1804 " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
@@ -1778,14 +1806,14 @@ static const char tex_22_vert_glsl[] =
1778 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n" 1806 " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
1779 " div_s = vec4(4, 4, 4, 4);\n" 1807 " div_s = vec4(4, 4, 4, 4);\n"
1780 "}\n"; 1808 "}\n";
1781Evas_GL_Program_Source shader_tex_22_vert_src = 1809Evas_GL_Program_Source shader_tex_22_nomul_afill_vert_src =
1782{ 1810{
1783 tex_22_vert_glsl, 1811 tex_22_nomul_afill_vert_glsl,
1784 NULL, 0 1812 NULL, 0
1785}; 1813};
1786 1814
1787/* Source: modules/evas/engines/gl_common/shader/tex_afill_frag.shd */ 1815/* Source: modules/evas/engines/gl_common/shader/tex_21_nomul_afill_frag.shd */
1788static const char tex_afill_frag_glsl[] = 1816static const char tex_21_nomul_afill_frag_glsl[] =
1789 "#ifdef GL_ES\n" 1817 "#ifdef GL_ES\n"
1790 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n" 1818 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1791 "precision highp float;\n" 1819 "precision highp float;\n"
@@ -1794,66 +1822,50 @@ static const char tex_afill_frag_glsl[] =
1794 "#endif\n" 1822 "#endif\n"
1795 "#endif\n" 1823 "#endif\n"
1796 "uniform sampler2D tex;\n" 1824 "uniform sampler2D tex;\n"
1797 "varying vec4 col;\n"
1798 "varying vec2 tex_c;\n" 1825 "varying vec2 tex_c;\n"
1826 "varying vec2 tex_s[2];\n"
1827 "varying vec4 div_s;\n"
1799 "void main()\n" 1828 "void main()\n"
1800 "{\n" 1829 "{\n"
1801 " vec4 c = texture2D(tex, tex_c.xy);\n" 1830 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
1802 " gl_FragColor = vec4(c.r, c.g, c.b, 1) * col;\n" 1831 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
1832 " vec4 c = (col00 + col01) / div_s;\n"
1833 " gl_FragColor = vec4(c.r, c.g, c.b, 1);\n"
1803 "}\n"; 1834 "}\n";
1804Evas_GL_Program_Source shader_tex_afill_frag_src = 1835Evas_GL_Program_Source shader_tex_21_nomul_afill_frag_src =
1805{ 1836{
1806 tex_afill_frag_glsl, 1837 tex_21_nomul_afill_frag_glsl,
1807 NULL, 0 1838 NULL, 0
1808}; 1839};
1809 1840
1810/* Source: modules/evas/engines/gl_common/shader/tex_afill_vert.shd */ 1841/* Source: modules/evas/engines/gl_common/shader/tex_21_nomul_afill_vert.shd */
1811static const char tex_afill_vert_glsl[] = 1842static const char tex_21_nomul_afill_vert_glsl[] =
1812 "#ifdef GL_ES\n" 1843 "#ifdef GL_ES\n"
1813 "precision highp float;\n" 1844 "precision highp float;\n"
1814 "#endif\n" 1845 "#endif\n"
1815 "attribute vec4 vertex;\n" 1846 "attribute vec4 vertex;\n"
1816 "attribute vec4 color;\n"
1817 "attribute vec2 tex_coord;\n" 1847 "attribute vec2 tex_coord;\n"
1848 "attribute vec2 tex_sample;\n"
1818 "uniform mat4 mvp;\n" 1849 "uniform mat4 mvp;\n"
1819 "varying vec4 col;\n"
1820 "varying vec2 tex_c;\n" 1850 "varying vec2 tex_c;\n"
1851 "varying vec2 tex_s[2];\n"
1852 "varying vec4 div_s;\n"
1821 "void main()\n" 1853 "void main()\n"
1822 "{\n" 1854 "{\n"
1823 " gl_Position = mvp * vertex;\n" 1855 " gl_Position = mvp * vertex;\n"
1824 " col = color;\n"
1825 " tex_c = tex_coord;\n" 1856 " tex_c = tex_coord;\n"
1857 " tex_s[0] = vec2(-tex_sample.x, 0);\n"
1858 " tex_s[1] = vec2( tex_sample.x, 0);\n"
1859 " div_s = vec4(2, 2, 2, 2);\n"
1826 "}\n"; 1860 "}\n";
1827Evas_GL_Program_Source shader_tex_afill_vert_src = 1861Evas_GL_Program_Source shader_tex_21_nomul_afill_vert_src =
1828{
1829 tex_afill_vert_glsl,
1830 NULL, 0
1831};
1832
1833/* Source: modules/evas/engines/gl_common/shader/tex_frag.shd */
1834static const char tex_frag_glsl[] =
1835 "#ifdef GL_ES\n"
1836 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1837 "precision highp float;\n"
1838 "#else\n"
1839 "precision mediump float;\n"
1840 "#endif\n"
1841 "#endif\n"
1842 "uniform sampler2D tex;\n"
1843 "varying vec4 col;\n"
1844 "varying vec2 tex_c;\n"
1845 "void main()\n"
1846 "{\n"
1847 " gl_FragColor = texture2D(tex, tex_c.xy) * col;\n"
1848 "}\n";
1849Evas_GL_Program_Source shader_tex_frag_src =
1850{ 1862{
1851 tex_frag_glsl, 1863 tex_21_nomul_afill_vert_glsl,
1852 NULL, 0 1864 NULL, 0
1853}; 1865};
1854 1866
1855/* Source: modules/evas/engines/gl_common/shader/tex_nomul_afill_frag.shd */ 1867/* Source: modules/evas/engines/gl_common/shader/tex_12_nomul_afill_frag.shd */
1856static const char tex_nomul_afill_frag_glsl[] = 1868static const char tex_12_nomul_afill_frag_glsl[] =
1857 "#ifdef GL_ES\n" 1869 "#ifdef GL_ES\n"
1858 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n" 1870 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1859 "precision highp float;\n" 1871 "precision highp float;\n"
@@ -1863,39 +1875,49 @@ static const char tex_nomul_afill_frag_glsl[] =
1863 "#endif\n" 1875 "#endif\n"
1864 "uniform sampler2D tex;\n" 1876 "uniform sampler2D tex;\n"
1865 "varying vec2 tex_c;\n" 1877 "varying vec2 tex_c;\n"
1878 "varying vec2 tex_s[2];\n"
1879 "varying vec4 div_s;\n"
1866 "void main()\n" 1880 "void main()\n"
1867 "{\n" 1881 "{\n"
1868 " vec4 c = texture2D(tex, tex_c.xy);\n" 1882 " vec4 col00 = texture2D(tex, tex_c + tex_s[0]);\n"
1883 " vec4 col01 = texture2D(tex, tex_c + tex_s[1]);\n"
1884 " vec4 c = (col00 + col01) / div_s;\n"
1869 " gl_FragColor = vec4(c.r, c.g, c.b, 1);\n" 1885 " gl_FragColor = vec4(c.r, c.g, c.b, 1);\n"
1870 "}\n"; 1886 "}\n";
1871Evas_GL_Program_Source shader_tex_nomul_afill_frag_src = 1887Evas_GL_Program_Source shader_tex_12_nomul_afill_frag_src =
1872{ 1888{
1873 tex_nomul_afill_frag_glsl, 1889 tex_12_nomul_afill_frag_glsl,
1874 NULL, 0 1890 NULL, 0
1875}; 1891};
1876 1892
1877/* Source: modules/evas/engines/gl_common/shader/tex_nomul_afill_vert.shd */ 1893/* Source: modules/evas/engines/gl_common/shader/tex_12_nomul_afill_vert.shd */
1878static const char tex_nomul_afill_vert_glsl[] = 1894static const char tex_12_nomul_afill_vert_glsl[] =
1879 "#ifdef GL_ES\n" 1895 "#ifdef GL_ES\n"
1880 "precision highp float;\n" 1896 "precision highp float;\n"
1881 "#endif\n" 1897 "#endif\n"
1882 "attribute vec4 vertex;\n" 1898 "attribute vec4 vertex;\n"
1883 "attribute vec2 tex_coord;\n" 1899 "attribute vec2 tex_coord;\n"
1900 "attribute vec2 tex_sample;\n"
1884 "uniform mat4 mvp;\n" 1901 "uniform mat4 mvp;\n"
1885 "varying vec2 tex_c;\n" 1902 "varying vec2 tex_c;\n"
1903 "varying vec2 tex_s[2];\n"
1904 "varying vec4 div_s;\n"
1886 "void main()\n" 1905 "void main()\n"
1887 "{\n" 1906 "{\n"
1888 " gl_Position = mvp * vertex;\n" 1907 " gl_Position = mvp * vertex;\n"
1889 " tex_c = tex_coord;\n" 1908 " tex_c = tex_coord;\n"
1909 " tex_s[0] = vec2(0, -tex_sample.y);\n"
1910 " tex_s[1] = vec2(0, tex_sample.y);\n"
1911 " div_s = vec4(2, 2, 2, 2);\n"
1890 "}\n"; 1912 "}\n";
1891Evas_GL_Program_Source shader_tex_nomul_afill_vert_src = 1913Evas_GL_Program_Source shader_tex_12_nomul_afill_vert_src =
1892{ 1914{
1893 tex_nomul_afill_vert_glsl, 1915 tex_12_nomul_afill_vert_glsl,
1894 NULL, 0 1916 NULL, 0
1895}; 1917};
1896 1918
1897/* Source: modules/evas/engines/gl_common/shader/tex_nomul_frag.shd */ 1919/* Source: modules/evas/engines/gl_common/shader/tex_nomul_afill_frag.shd */
1898static const char tex_nomul_frag_glsl[] = 1920static const char tex_nomul_afill_frag_glsl[] =
1899 "#ifdef GL_ES\n" 1921 "#ifdef GL_ES\n"
1900 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n" 1922 "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
1901 "precision highp float;\n" 1923 "precision highp float;\n"
@@ -1907,54 +1929,32 @@ static const char tex_nomul_frag_glsl[] =
1907 "varying vec2 tex_c;\n" 1929 "varying vec2 tex_c;\n"
1908 "void main()\n" 1930 "void main()\n"
1909 "{\n" 1931 "{\n"
1910 " gl_FragColor = texture2D(tex, tex_c.xy);\n" 1932 " vec4 c = texture2D(tex, tex_c.xy);\n"
1911 "}\n"; 1933 " gl_FragColor = vec4(c.r, c.g, c.b, 1);\n"
1912Evas_GL_Program_Source shader_tex_nomul_frag_src =
1913{
1914 tex_nomul_frag_glsl,
1915 NULL, 0
1916};
1917
1918/* Source: modules/evas/engines/gl_common/shader/tex_nomul_vert.shd */
1919static const char tex_nomul_vert_glsl[] =
1920 "#ifdef GL_ES\n"
1921 "precision highp float;\n"
1922 "#endif\n"
1923 "attribute vec4 vertex;\n"
1924 "attribute vec2 tex_coord;\n"
1925 "uniform mat4 mvp;\n"
1926 "varying vec2 tex_c;\n"
1927 "void main()\n"
1928 "{\n"
1929 " gl_Position = mvp * vertex;\n"
1930 " tex_c = tex_coord;\n"
1931 "}\n"; 1934 "}\n";
1932Evas_GL_Program_Source shader_tex_nomul_vert_src = 1935Evas_GL_Program_Source shader_tex_nomul_afill_frag_src =
1933{ 1936{
1934 tex_nomul_vert_glsl, 1937 tex_nomul_afill_frag_glsl,
1935 NULL, 0 1938 NULL, 0
1936}; 1939};
1937 1940
1938/* Source: modules/evas/engines/gl_common/shader/tex_vert.shd */ 1941/* Source: modules/evas/engines/gl_common/shader/tex_nomul_afill_vert.shd */
1939static const char tex_vert_glsl[] = 1942static const char tex_nomul_afill_vert_glsl[] =
1940 "#ifdef GL_ES\n" 1943 "#ifdef GL_ES\n"
1941 "precision highp float;\n" 1944 "precision highp float;\n"
1942 "#endif\n" 1945 "#endif\n"
1943 "attribute vec4 vertex;\n" 1946 "attribute vec4 vertex;\n"
1944 "attribute vec4 color;\n"
1945 "attribute vec2 tex_coord;\n" 1947 "attribute vec2 tex_coord;\n"
1946 "uniform mat4 mvp;\n" 1948 "uniform mat4 mvp;\n"
1947 "varying vec4 col;\n"
1948 "varying vec2 tex_c;\n" 1949 "varying vec2 tex_c;\n"
1949 "void main()\n" 1950 "void main()\n"
1950 "{\n" 1951 "{\n"
1951 " gl_Position = mvp * vertex;\n" 1952 " gl_Position = mvp * vertex;\n"
1952 " col = color;\n"
1953 " tex_c = tex_coord;\n" 1953 " tex_c = tex_coord;\n"
1954 "}\n"; 1954 "}\n";
1955Evas_GL_Program_Source shader_tex_vert_src = 1955Evas_GL_Program_Source shader_tex_nomul_afill_vert_src =
1956{ 1956{
1957 tex_vert_glsl, 1957 tex_nomul_afill_vert_glsl,
1958 NULL, 0 1958 NULL, 0
1959}; 1959};
1960 1960
@@ -2209,22 +2209,22 @@ static const struct {
2209 { SHADER_RECT, &(shader_rect_vert_src), &(shader_rect_frag_src), "rect" }, 2209 { SHADER_RECT, &(shader_rect_vert_src), &(shader_rect_frag_src), "rect" },
2210 { SHADER_RGB_A_PAIR_NOMUL, &(shader_rgb_a_pair_nomul_vert_src), &(shader_rgb_a_pair_nomul_frag_src), "rgb_a_pair_nomul" }, 2210 { SHADER_RGB_A_PAIR_NOMUL, &(shader_rgb_a_pair_nomul_vert_src), &(shader_rgb_a_pair_nomul_frag_src), "rgb_a_pair_nomul" },
2211 { SHADER_RGB_A_PAIR, &(shader_rgb_a_pair_vert_src), &(shader_rgb_a_pair_frag_src), "rgb_a_pair" }, 2211 { SHADER_RGB_A_PAIR, &(shader_rgb_a_pair_vert_src), &(shader_rgb_a_pair_frag_src), "rgb_a_pair" },
2212 { SHADER_TEX_12_AFILL, &(shader_tex_12_afill_vert_src), &(shader_tex_12_afill_frag_src), "tex_12_afill" },
2213 { SHADER_TEX_12_NOMUL_AFILL, &(shader_tex_12_nomul_afill_vert_src), &(shader_tex_12_nomul_afill_frag_src), "tex_12_nomul_afill" },
2214 { SHADER_TEX_12_NOMUL, &(shader_tex_12_nomul_vert_src), &(shader_tex_12_nomul_frag_src), "tex_12_nomul" },
2215 { SHADER_TEX_12, &(shader_tex_12_vert_src), &(shader_tex_12_frag_src), "tex_12" }, 2212 { SHADER_TEX_12, &(shader_tex_12_vert_src), &(shader_tex_12_frag_src), "tex_12" },
2216 { SHADER_TEX_21_AFILL, &(shader_tex_21_afill_vert_src), &(shader_tex_21_afill_frag_src), "tex_21_afill" }, 2213 { SHADER_TEX_12_NOMUL, &(shader_tex_12_nomul_vert_src), &(shader_tex_12_nomul_frag_src), "tex_12_nomul" },
2217 { SHADER_TEX_21_NOMUL_AFILL, &(shader_tex_21_nomul_afill_vert_src), &(shader_tex_21_nomul_afill_frag_src), "tex_21_nomul_afill" },
2218 { SHADER_TEX_21_NOMUL, &(shader_tex_21_nomul_vert_src), &(shader_tex_21_nomul_frag_src), "tex_21_nomul" },
2219 { SHADER_TEX_21, &(shader_tex_21_vert_src), &(shader_tex_21_frag_src), "tex_21" }, 2214 { SHADER_TEX_21, &(shader_tex_21_vert_src), &(shader_tex_21_frag_src), "tex_21" },
2220 { SHADER_TEX_22_AFILL, &(shader_tex_22_afill_vert_src), &(shader_tex_22_afill_frag_src), "tex_22_afill" }, 2215 { SHADER_TEX_21_NOMUL, &(shader_tex_21_nomul_vert_src), &(shader_tex_21_nomul_frag_src), "tex_21_nomul" },
2221 { SHADER_TEX_22_NOMUL_AFILL, &(shader_tex_22_nomul_afill_vert_src), &(shader_tex_22_nomul_afill_frag_src), "tex_22_nomul_afill" },
2222 { SHADER_TEX_22_NOMUL, &(shader_tex_22_nomul_vert_src), &(shader_tex_22_nomul_frag_src), "tex_22_nomul" },
2223 { SHADER_TEX_22, &(shader_tex_22_vert_src), &(shader_tex_22_frag_src), "tex_22" }, 2216 { SHADER_TEX_22, &(shader_tex_22_vert_src), &(shader_tex_22_frag_src), "tex_22" },
2217 { SHADER_TEX_22_NOMUL, &(shader_tex_22_nomul_vert_src), &(shader_tex_22_nomul_frag_src), "tex_22_nomul" },
2218 { SHADER_TEX, &(shader_tex_vert_src), &(shader_tex_frag_src), "tex" },
2219 { SHADER_TEX_NOMUL, &(shader_tex_nomul_vert_src), &(shader_tex_nomul_frag_src), "tex_nomul" },
2224 { SHADER_TEX_AFILL, &(shader_tex_afill_vert_src), &(shader_tex_afill_frag_src), "tex_afill" }, 2220 { SHADER_TEX_AFILL, &(shader_tex_afill_vert_src), &(shader_tex_afill_frag_src), "tex_afill" },
2221 { SHADER_TEX_22_AFILL, &(shader_tex_22_afill_vert_src), &(shader_tex_22_afill_frag_src), "tex_22_afill" },
2222 { SHADER_TEX_21_AFILL, &(shader_tex_21_afill_vert_src), &(shader_tex_21_afill_frag_src), "tex_21_afill" },
2223 { SHADER_TEX_12_AFILL, &(shader_tex_12_afill_vert_src), &(shader_tex_12_afill_frag_src), "tex_12_afill" },
2224 { SHADER_TEX_22_NOMUL_AFILL, &(shader_tex_22_nomul_afill_vert_src), &(shader_tex_22_nomul_afill_frag_src), "tex_22_nomul_afill" },
2225 { SHADER_TEX_21_NOMUL_AFILL, &(shader_tex_21_nomul_afill_vert_src), &(shader_tex_21_nomul_afill_frag_src), "tex_21_nomul_afill" },
2226 { SHADER_TEX_12_NOMUL_AFILL, &(shader_tex_12_nomul_afill_vert_src), &(shader_tex_12_nomul_afill_frag_src), "tex_12_nomul_afill" },
2225 { SHADER_TEX_NOMUL_AFILL, &(shader_tex_nomul_afill_vert_src), &(shader_tex_nomul_afill_frag_src), "tex_nomul_afill" }, 2227 { SHADER_TEX_NOMUL_AFILL, &(shader_tex_nomul_afill_vert_src), &(shader_tex_nomul_afill_frag_src), "tex_nomul_afill" },
2226 { SHADER_TEX_NOMUL, &(shader_tex_nomul_vert_src), &(shader_tex_nomul_frag_src), "tex_nomul" },
2227 { SHADER_TEX, &(shader_tex_vert_src), &(shader_tex_frag_src), "tex" },
2228 { SHADER_YUV_NOMUL, &(shader_yuv_nomul_vert_src), &(shader_yuv_nomul_frag_src), "yuv_nomul" }, 2228 { SHADER_YUV_NOMUL, &(shader_yuv_nomul_vert_src), &(shader_yuv_nomul_frag_src), "yuv_nomul" },
2229 { SHADER_YUV, &(shader_yuv_vert_src), &(shader_yuv_frag_src), "yuv" }, 2229 { SHADER_YUV, &(shader_yuv_vert_src), &(shader_yuv_frag_src), "yuv" },
2230 { SHADER_YUY2_NOMUL, &(shader_yuy2_nomul_vert_src), &(shader_yuy2_nomul_frag_src), "yuy2_nomul" }, 2230 { SHADER_YUY2_NOMUL, &(shader_yuy2_nomul_vert_src), &(shader_yuy2_nomul_frag_src), "yuy2_nomul" },
diff --git a/src/modules/evas/engines/gl_common/shader/gen_shaders.sh b/src/modules/evas/engines/gl_common/shader/gen_shaders.sh
index acfc27735c..9c3f7bf501 100755
--- a/src/modules/evas/engines/gl_common/shader/gen_shaders.sh
+++ b/src/modules/evas/engines/gl_common/shader/gen_shaders.sh
@@ -6,7 +6,10 @@
6DIR=`dirname $0` 6DIR=`dirname $0`
7 7
8OUTPUT=${DIR}/evas_gl_shaders.x 8OUTPUT=${DIR}/evas_gl_shaders.x
9SHADERS=${DIR}/*.shd 9OUTPUT_ENUM=${DIR}/evas_gl_enum.x
10
11#SHADERS=${DIR}/*.shd
12SHADERS="$@"
10 13
11# Redirect output to ${OUTPUT} 14# Redirect output to ${OUTPUT}
12exec 1<&- 15exec 1<&-
@@ -20,6 +23,7 @@ printf "#include \"../evas_gl_private.h\"\n\n"
20 23
21# Prepare list of shaders: 24# Prepare list of shaders:
22shaders_source="" 25shaders_source=""
26shaders_enum=""
23 27
24# Reading with the following code breaks indents: 28# Reading with the following code breaks indents:
25# while read -r line ; do 29# while read -r line ; do
@@ -47,6 +51,7 @@ for shd in ${SHADERS} ; do
47 name=`echo ${lname} |sed -e 's/_vert//'` 51 name=`echo ${lname} |sed -e 's/_vert//'`
48 SHADER=`echo ${UNAME} |sed -e 's/_VERT//'` 52 SHADER=`echo ${UNAME} |sed -e 's/_VERT//'`
49 shaders_source="${shaders_source} { SHADER_${SHADER}, &(shader_${name}_vert_src), &(shader_${name}_frag_src), \"${name}\" },\n" 53 shaders_source="${shaders_source} { SHADER_${SHADER}, &(shader_${name}_vert_src), &(shader_${name}_frag_src), \"${name}\" },\n"
54 shaders_enum="${shaders_enum} SHADER_${SHADER},\n"
50 fi 55 fi
51done 56done
52 57
@@ -59,4 +64,10 @@ printf "static const struct {
59 64
60printf "${shaders_source}};\n\n" 65printf "${shaders_source}};\n\n"
61 66
67printf "/* DO NOT MODIFY THIS FILE AS IT IS AUTO-GENERATED\n * See: $0 */
68
69typedef enum {
70${shaders_enum} SHADER_LAST
71} Evas_GL_Shader;
72" >| ${OUTPUT_ENUM}
62 73