#define SHAD_TEXUV2 3
#define SHAD_TEXUV3 4
#define SHAD_TEXA 5
-#define SHAD_TEXSAM 6
-#define SHAD_TEXM 7
+#define SHAD_TEXM 6
typedef struct _Evas_GL_Program Evas_GL_Program;
typedef struct _Evas_GL_Program_Source Evas_GL_Program_Source;
GLfloat *texuv2;
GLfloat *texuv3;
GLfloat *texa;
- GLfloat *texsam;
GLfloat *texm;
Eina_List *uniforms; /* Evas_GL_Uniform */
Eina_Bool line: 1;
Eina_Bool use_texuv2 : 1;
Eina_Bool use_texuv3 : 1;
Eina_Bool use_texa : 1;
- Eina_Bool use_texsam : 1;
Eina_Bool use_texm : 1;
Eina_Bool anti_alias : 1;
Evas_GL_Image *im;
if (gc->pipe[i].array.texa) free(gc->pipe[i].array.texa);
if (gc->pipe[i].array.texuv2) free(gc->pipe[i].array.texuv2);
if (gc->pipe[i].array.texuv3) free(gc->pipe[i].array.texuv3);
- if (gc->pipe[i].array.texsam) free(gc->pipe[i].array.texsam);
if (gc->pipe[i].array.texm) free(gc->pipe[i].array.texm);
}
}
#define PUSH_TEXM(n, u, v) do { \
gc->pipe[n].array.texm[nm++] = u; \
gc->pipe[n].array.texm[nm++] = v; } while(0)
-#define PUSH_TEXSAM(n, x, y) do { \
- gc->pipe[n].array.texsam[ns++] = x; \
- gc->pipe[n].array.texsam[ns++] = y; } while(0)
#define PUSH_6_COLORS(pn, r, g, b, a) \
do { int i; for (i = 0; i < 6; i++) PUSH_COLOR(pn, r, g, b, a); } while(0)
ALOC(texa, GLfloat, 2);
ALOC(texuv2, GLfloat, 2);
ALOC(texuv3, GLfloat, 2);
- ALOC(texsam, GLfloat, 2);
ALOC(texm, GLfloat, 2);
return;
}
RALOC(texa, GLfloat, 2);
RALOC(texuv2, GLfloat, 2);
RALOC(texuv3, GLfloat, 2);
- RALOC(texsam, GLfloat, 2);
RALOC(texm, GLfloat, 2);
}
gc->pipe[pn].array.use_texuv2 = 0;
gc->pipe[pn].array.use_texuv3 = 0;
gc->pipe[pn].array.use_texa = 0;
- gc->pipe[pn].array.use_texsam = 0;
gc->pipe[pn].array.use_texm = 0;
PIPE_GROW(gc, pn, 2);
gc->pipe[pn].array.use_texuv2 = 0;
gc->pipe[pn].array.use_texuv3 = 0;
gc->pipe[pn].array.use_texa = 0;
- gc->pipe[pn].array.use_texsam = 0;
gc->pipe[pn].array.use_texm = 0;
}
gc->pipe[pn].array.use_texuv2 = 0;
gc->pipe[pn].array.use_texuv3 = 0;
gc->pipe[pn].array.use_texa = 0;
- gc->pipe[pn].array.use_texsam = 0;
gc->pipe[pn].array.use_texm = !!mtex;
}
else
gc->pipe[pn].array.use_texuv2 = 0;
gc->pipe[pn].array.use_texuv3 = 0;
gc->pipe[pn].array.use_texa = 0;
- gc->pipe[pn].array.use_texsam = 0;
gc->pipe[pn].array.use_texm = !!mtex;
}
}
gc->pipe[pn].array.use_texuv2 = 0;
gc->pipe[pn].array.use_texuv3 = 0;
gc->pipe[pn].array.use_texa = 0;
- gc->pipe[pn].array.use_texsam = 0;
gc->pipe[pn].array.use_texm = !!mtex;
#endif
gc->pipe[pn].array.use_texuv2 = 0;
gc->pipe[pn].array.use_texuv3 = 0;
gc->pipe[pn].array.use_texm = !!mtex;
- gc->pipe[pn].array.use_texsam = sam;
pipe_region_expand(gc, pn, x, y, w, h);
PIPE_GROW(gc, pn, 6);
{
double samx = (double)(sw) / (double)(tex->pt->w * w * 4);
double samy = (double)(sh) / (double)(tex->pt->h * h * 4);
-
- PUSH_TEXSAM(pn, samx, samy);
- PUSH_TEXSAM(pn, samx, samy);
- PUSH_TEXSAM(pn, samx, samy);
-
- PUSH_TEXSAM(pn, samx, samy);
- PUSH_TEXSAM(pn, samx, samy);
- PUSH_TEXSAM(pn, samx, samy);
+ PUSH_UNIFORM(pn, EVAS_GL_UNIFORM_VEC2, "sample", samx, samy);
}
PUSH_MASK(pn, mtex, mx, my, mw, mh);
gc->pipe[pn].array.use_texuv2 = 0;
gc->pipe[pn].array.use_texuv3 = 0;
gc->pipe[pn].array.use_texm = !!mtex;
- gc->pipe[pn].array.use_texsam = 0;
pipe_region_expand(gc, pn, x, y, w, h);
PIPE_GROW(gc, pn, 6);
gc->pipe[pn].array.use_texuv2 = 1;
gc->pipe[pn].array.use_texuv3 = 1;
gc->pipe[pn].array.use_texm = !!mtex;
- gc->pipe[pn].array.use_texsam = 0;
pipe_region_expand(gc, pn, x, y, w, h);
PIPE_GROW(gc, pn, 6);
gc->pipe[pn].array.use_texuv2 = 1;
gc->pipe[pn].array.use_texuv3 = 0;
gc->pipe[pn].array.use_texm = !!mtex;
- gc->pipe[pn].array.use_texsam = 0;
pipe_region_expand(gc, pn, x, y, w, h);
PIPE_GROW(gc, pn, 6);
gc->pipe[pn].array.use_texuv2 = 1;
gc->pipe[pn].array.use_texuv3 = 0;
gc->pipe[pn].array.use_texm = !!mtex;
- gc->pipe[pn].array.use_texsam = 0;
pipe_region_expand(gc, pn, x, y, w, h);
PIPE_GROW(gc, pn, 6);
gc->pipe[pn].array.use_texuv2 = 0;
gc->pipe[pn].array.use_texuv3 = 0;
gc->pipe[pn].array.use_texa = EINA_TRUE;
- gc->pipe[pn].array.use_texsam = 0;
gc->pipe[pn].array.use_texm = !!mtex;
pipe_region_expand(gc, pn, x, y, w, h);
gc->pipe[pn].array.use_texuv3 = (utexture) ? 1 : 0;
gc->pipe[pn].array.use_texm = !!mtex;
gc->pipe[pn].array.use_texa = 0;
- gc->pipe[pn].array.use_texsam = 0;
pipe_region_expand(gc, pn, x, y, w, h);
PIPE_GROW(gc, pn, 6);
unsigned char *texuv2_ptr = NULL;
unsigned char *texuv3_ptr = NULL;
unsigned char *texa_ptr = NULL;
- unsigned char *texsam_ptr = NULL;
unsigned char *texm_ptr = NULL;
if (glsym_glMapBuffer && glsym_glUnmapBuffer)
texuv2_ptr = texuv_ptr + TEX_SIZE;
texuv3_ptr = texuv2_ptr + TEX_SIZE;
texa_ptr = texuv3_ptr + TEX_SIZE;
- texsam_ptr = texa_ptr + TEX_SIZE;
- texm_ptr = texsam_ptr + TEX_SIZE;
+ texm_ptr = texa_ptr + TEX_SIZE;
# define END_POINTER (texm_ptr + TEX_SIZE)
glBindBuffer(GL_ARRAY_BUFFER, gc->pipe[i].array.buffer);
memcpy(x + (unsigned long)texuv3_ptr, gc->pipe[i].array.texuv3, TEX_SIZE);
if (gc->pipe[i].array.use_texa)
memcpy(x + (unsigned long)texa_ptr, gc->pipe[i].array.texa, TEX_SIZE);
- if (gc->pipe[i].array.use_texsam)
- memcpy(x + (unsigned long)texsam_ptr, gc->pipe[i].array.texsam, TEX_SIZE);
if (gc->pipe[i].array.use_texm)
memcpy(x + (unsigned long)texm_ptr, gc->pipe[i].array.texm, TEX_SIZE);
/*
- fprintf(stderr, "copy %i bytes [%i/%i slots] [%i + %i + %i + %i + %i + %i + %i] <%i %i %i %i %i %i %i>\n",
+ fprintf(stderr, "copy %i bytes [%i/%i slots] [%i + %i + %i + %i + %i + %i + %i] <%i %i %i %i %i %i>\n",
(int)((unsigned char *)END_POINTER),
gc->pipe[i].array.num,
gc->pipe[i].array.alloc,
gc->pipe[i].array.use_texuv2,
gc->pipe[i].array.use_texuv3,
gc->pipe[i].array.use_texa,
- gc->pipe[i].array.use_texsam,
gc->pipe[i].array.use_texm);
*/
glsym_glUnmapBuffer(GL_ARRAY_BUFFER);
texuv2_ptr = (unsigned char *)gc->pipe[i].array.texuv2;
texuv3_ptr = (unsigned char *)gc->pipe[i].array.texuv3;
texa_ptr = (unsigned char *)gc->pipe[i].array.texa;
- texsam_ptr = (unsigned char *)gc->pipe[i].array.texsam;
texm_ptr = (unsigned char *)gc->pipe[i].array.texm;
}
glVertexAttribPointer(SHAD_VERTEX, 3, GL_SHORT, GL_FALSE, 0, (void *)vertex_ptr);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glDisableVertexAttribArray(SHAD_TEXA);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glDisableVertexAttribArray(SHAD_TEXSAM);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glDisableVertexAttribArray(SHAD_TEXM);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glDrawArrays(GL_LINES, 0, gc->pipe[i].array.num);
glDisableVertexAttribArray(SHAD_TEXA);
}
- if (gc->pipe[i].array.use_texsam)
- {
- glEnableVertexAttribArray(SHAD_TEXSAM);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glVertexAttribPointer(SHAD_TEXSAM, 2, GL_FLOAT, GL_FALSE, 0, (void *)texsam_ptr);
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- }
- else
- {
- glDisableVertexAttribArray(SHAD_TEXSAM);
- }
if ((gc->pipe[i].array.use_texuv2) && (gc->pipe[i].array.use_texuv3))
{
glEnableVertexAttribArray(SHAD_TEXUV2);
if (gc->pipe[i].array.texa) free(gc->pipe[i].array.texa);
if (gc->pipe[i].array.texuv2) free(gc->pipe[i].array.texuv2);
if (gc->pipe[i].array.texuv3) free(gc->pipe[i].array.texuv3);
- if (gc->pipe[i].array.texsam) free(gc->pipe[i].array.texsam);
if (gc->pipe[i].array.texm) free(gc->pipe[i].array.texm);
gc->pipe[i].array.line = 0;
gc->pipe[i].array.use_texuv2 = 0;
gc->pipe[i].array.use_texuv3 = 0;
gc->pipe[i].array.use_texa = 0;
- gc->pipe[i].array.use_texsam = 0;
gc->pipe[i].array.use_texm = 0;
gc->pipe[i].array.vertex = NULL;
gc->pipe[i].array.texa = NULL;
gc->pipe[i].array.texuv2 = NULL;
gc->pipe[i].array.texuv3 = NULL;
- gc->pipe[i].array.texsam = NULL;
gc->pipe[i].array.texm = NULL;
gc->pipe[i].array.num = 0;
glBindAttribLocation(p->prog, SHAD_TEXUV2, "tex_coord2");
glBindAttribLocation(p->prog, SHAD_TEXUV3, "tex_coord3");
glBindAttribLocation(p->prog, SHAD_TEXA, "tex_coorda");
- glBindAttribLocation(p->prog, SHAD_TEXSAM, "tex_sample");
glBindAttribLocation(p->prog, SHAD_TEXM, "tex_coordm");
glGetProgramiv(p->prog, GL_LINK_STATUS, &ok);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glBindAttribLocation(p->prog, SHAD_TEXA, "tex_coorda");
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- glBindAttribLocation(p->prog, SHAD_TEXSAM, "tex_sample");
- GLERR(__FUNCTION__, __FILE__, __LINE__, "");
glBindAttribLocation(p->prog, SHAD_TEXM, "tex_coordm");
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
"#endif\n"
"attribute vec4 vertex;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_s[2];\n"
"{\n"
" gl_Position = mvp * vertex;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(0, -tex_sample.y);\n"
- " tex_s[1] = vec2(0, tex_sample.y);\n"
+ " tex_s[0] = vec2(0, -sample.y);\n"
+ " tex_s[1] = vec2(0, sample.y);\n"
" div_s = vec4(2, 2, 2, 2);\n"
"}\n";
Evas_GL_Program_Source shader_img_12_bgra_nomul_vert_src =
"attribute vec4 vertex;\n"
"attribute vec4 color;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
" gl_Position = mvp * vertex;\n"
" col = color;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(0, -tex_sample.y);\n"
- " tex_s[1] = vec2(0, tex_sample.y);\n"
+ " tex_s[0] = vec2(0, -sample.y);\n"
+ " tex_s[1] = vec2(0, sample.y);\n"
" div_s = vec4(2, 2, 2, 2);\n"
"}\n";
Evas_GL_Program_Source shader_img_12_bgra_vert_src =
"#endif\n"
"attribute vec4 vertex;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_s[2];\n"
"{\n"
" gl_Position = mvp * vertex;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(0, -tex_sample.y);\n"
- " tex_s[1] = vec2(0, tex_sample.y);\n"
+ " tex_s[0] = vec2(0, -sample.y);\n"
+ " tex_s[1] = vec2(0, sample.y);\n"
" div_s = vec4(2, 2, 2, 2);\n"
"}\n";
Evas_GL_Program_Source shader_img_12_nomul_vert_src =
"attribute vec4 vertex;\n"
"attribute vec4 color;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
" gl_Position = mvp * vertex;\n"
" col = color;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(0, -tex_sample.y);\n"
- " tex_s[1] = vec2(0, tex_sample.y);\n"
+ " tex_s[0] = vec2(0, -sample.y);\n"
+ " tex_s[1] = vec2(0, sample.y);\n"
" div_s = vec4(2, 2, 2, 2);\n"
"}\n";
Evas_GL_Program_Source shader_img_12_vert_src =
"#endif\n"
"attribute vec4 vertex;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_s[2];\n"
"{\n"
" gl_Position = mvp * vertex;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(-tex_sample.x, 0);\n"
- " tex_s[1] = vec2( tex_sample.x, 0);\n"
+ " tex_s[0] = vec2(-sample.x, 0);\n"
+ " tex_s[1] = vec2( sample.x, 0);\n"
" div_s = vec4(2, 2, 2, 2);\n"
"}\n";
Evas_GL_Program_Source shader_img_21_bgra_nomul_vert_src =
"attribute vec4 vertex;\n"
"attribute vec4 color;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
" gl_Position = mvp * vertex;\n"
" col = color;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(-tex_sample.x, 0);\n"
- " tex_s[1] = vec2( tex_sample.x, 0);\n"
+ " tex_s[0] = vec2(-sample.x, 0);\n"
+ " tex_s[1] = vec2( sample.x, 0);\n"
" div_s = vec4(2, 2, 2, 2);\n"
"}\n";
Evas_GL_Program_Source shader_img_21_bgra_vert_src =
"#endif\n"
"attribute vec4 vertex;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_s[2];\n"
"{\n"
" gl_Position = mvp * vertex;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(-tex_sample.x, 0);\n"
- " tex_s[1] = vec2( tex_sample.x, 0);\n"
+ " tex_s[0] = vec2(-sample.x, 0);\n"
+ " tex_s[1] = vec2( sample.x, 0);\n"
" div_s = vec4(2, 2, 2, 2);\n"
"}\n";
Evas_GL_Program_Source shader_img_21_nomul_vert_src =
"attribute vec4 vertex;\n"
"attribute vec4 color;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
" gl_Position = mvp * vertex;\n"
" col = color;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(-tex_sample.x, 0);\n"
- " tex_s[1] = vec2( tex_sample.x, 0);\n"
+ " tex_s[0] = vec2(-sample.x, 0);\n"
+ " tex_s[1] = vec2( sample.x, 0);\n"
" div_s = vec4(2, 2, 2, 2);\n"
"}\n";
Evas_GL_Program_Source shader_img_21_vert_src =
"#endif\n"
"attribute vec4 vertex;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_s[4];\n"
"{\n"
" gl_Position = mvp * vertex;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
- " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
- " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
- " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
+ " tex_s[0] = vec2(-sample.x, -sample.y);\n"
+ " tex_s[1] = vec2( sample.x, -sample.y);\n"
+ " tex_s[2] = vec2( sample.x, sample.y);\n"
+ " tex_s[3] = vec2(-sample.x, sample.y);\n"
" div_s = vec4(4, 4, 4, 4);\n"
"}\n";
Evas_GL_Program_Source shader_img_22_bgra_nomul_vert_src =
"attribute vec4 vertex;\n"
"attribute vec4 color;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
" gl_Position = mvp * vertex;\n"
" col = color;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
- " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
- " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
- " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
+ " tex_s[0] = vec2(-sample.x, -sample.y);\n"
+ " tex_s[1] = vec2( sample.x, -sample.y);\n"
+ " tex_s[2] = vec2( sample.x, sample.y);\n"
+ " tex_s[3] = vec2(-sample.x, sample.y);\n"
" div_s = vec4(4, 4, 4, 4);\n"
"}\n";
Evas_GL_Program_Source shader_img_22_bgra_vert_src =
"#endif\n"
"attribute vec4 vertex;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_s[4];\n"
"{\n"
" gl_Position = mvp * vertex;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
- " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
- " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
- " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
+ " tex_s[0] = vec2(-sample.x, -sample.y);\n"
+ " tex_s[1] = vec2( sample.x, -sample.y);\n"
+ " tex_s[2] = vec2( sample.x, sample.y);\n"
+ " tex_s[3] = vec2(-sample.x, sample.y);\n"
" div_s = vec4(4, 4, 4, 4);\n"
"}\n";
Evas_GL_Program_Source shader_img_22_nomul_vert_src =
"attribute vec4 vertex;\n"
"attribute vec4 color;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
" gl_Position = mvp * vertex;\n"
" col = color;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
- " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
- " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
- " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
+ " tex_s[0] = vec2(-sample.x, -sample.y);\n"
+ " tex_s[1] = vec2( sample.x, -sample.y);\n"
+ " tex_s[2] = vec2( sample.x, sample.y);\n"
+ " tex_s[3] = vec2(-sample.x, sample.y);\n"
" div_s = vec4(4, 4, 4, 4);\n"
"}\n";
Evas_GL_Program_Source shader_img_22_vert_src =
"attribute vec4 vertex;\n"
"attribute vec4 color;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
" gl_Position = mvp * vertex;\n"
" col = color;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(0, -tex_sample.y);\n"
- " tex_s[1] = vec2(0, tex_sample.y);\n"
+ " tex_s[0] = vec2(0, -sample.y);\n"
+ " tex_s[1] = vec2(0, sample.y);\n"
" div_s = vec4(2, 2, 2, 2);\n"
"}\n";
Evas_GL_Program_Source shader_tex_12_vert_src =
"#endif\n"
"attribute vec4 vertex;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_s[2];\n"
"{\n"
" gl_Position = mvp * vertex;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(0, -tex_sample.y);\n"
- " tex_s[1] = vec2(0, tex_sample.y);\n"
+ " tex_s[0] = vec2(0, -sample.y);\n"
+ " tex_s[1] = vec2(0, sample.y);\n"
" div_s = vec4(2, 2, 2, 2);\n"
"}\n";
Evas_GL_Program_Source shader_tex_12_nomul_vert_src =
"attribute vec4 vertex;\n"
"attribute vec4 color;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
" gl_Position = mvp * vertex;\n"
" col = color;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(-tex_sample.x, 0);\n"
- " tex_s[1] = vec2( tex_sample.x, 0);\n"
+ " tex_s[0] = vec2(-sample.x, 0);\n"
+ " tex_s[1] = vec2( sample.x, 0);\n"
" div_s = vec4(2, 2, 2, 2);\n"
"}\n";
Evas_GL_Program_Source shader_tex_21_vert_src =
"#endif\n"
"attribute vec4 vertex;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_s[2];\n"
"{\n"
" gl_Position = mvp * vertex;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(-tex_sample.x, 0);\n"
- " tex_s[1] = vec2( tex_sample.x, 0);\n"
+ " tex_s[0] = vec2(-sample.x, 0);\n"
+ " tex_s[1] = vec2( sample.x, 0);\n"
" div_s = vec4(2, 2, 2, 2);\n"
"}\n";
Evas_GL_Program_Source shader_tex_21_nomul_vert_src =
"attribute vec4 vertex;\n"
"attribute vec4 color;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
" gl_Position = mvp * vertex;\n"
" col = color;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
- " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
- " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
- " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
+ " tex_s[0] = vec2(-sample.x, -sample.y);\n"
+ " tex_s[1] = vec2( sample.x, -sample.y);\n"
+ " tex_s[2] = vec2( sample.x, sample.y);\n"
+ " tex_s[3] = vec2(-sample.x, sample.y);\n"
" div_s = vec4(4, 4, 4, 4);\n"
"}\n";
Evas_GL_Program_Source shader_tex_22_vert_src =
"#endif\n"
"attribute vec4 vertex;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_s[4];\n"
"{\n"
" gl_Position = mvp * vertex;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
- " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
- " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
- " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
+ " tex_s[0] = vec2(-sample.x, -sample.y);\n"
+ " tex_s[1] = vec2( sample.x, -sample.y);\n"
+ " tex_s[2] = vec2( sample.x, sample.y);\n"
+ " tex_s[3] = vec2(-sample.x, sample.y);\n"
" div_s = vec4(4, 4, 4, 4);\n"
"}\n";
Evas_GL_Program_Source shader_tex_22_nomul_vert_src =
"attribute vec4 vertex;\n"
"attribute vec4 color;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
" gl_Position = mvp * vertex;\n"
" col = color;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
- " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
- " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
- " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
+ " tex_s[0] = vec2(-sample.x, -sample.y);\n"
+ " tex_s[1] = vec2( sample.x, -sample.y);\n"
+ " tex_s[2] = vec2( sample.x, sample.y);\n"
+ " tex_s[3] = vec2(-sample.x, sample.y);\n"
" div_s = vec4(4, 4, 4, 4);\n"
"}\n";
Evas_GL_Program_Source shader_tex_22_afill_vert_src =
"attribute vec4 vertex;\n"
"attribute vec4 color;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
" gl_Position = mvp * vertex;\n"
" col = color;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(-tex_sample.x, 0);\n"
- " tex_s[1] = vec2( tex_sample.x, 0);\n"
+ " tex_s[0] = vec2(-sample.x, 0);\n"
+ " tex_s[1] = vec2( sample.x, 0);\n"
" div_s = vec4(2, 2, 2, 2);\n"
"}\n";
Evas_GL_Program_Source shader_tex_21_afill_vert_src =
"attribute vec4 vertex;\n"
"attribute vec4 color;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec4 col;\n"
"varying vec2 tex_c;\n"
" gl_Position = mvp * vertex;\n"
" col = color;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(0, -tex_sample.y);\n"
- " tex_s[1] = vec2(0, tex_sample.y);\n"
+ " tex_s[0] = vec2(0, -sample.y);\n"
+ " tex_s[1] = vec2(0, sample.y);\n"
" div_s = vec4(2, 2, 2, 2);\n"
"}\n";
Evas_GL_Program_Source shader_tex_12_afill_vert_src =
"#endif\n"
"attribute vec4 vertex;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_s[4];\n"
"{\n"
" gl_Position = mvp * vertex;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);\n"
- " tex_s[1] = vec2( tex_sample.x, -tex_sample.y);\n"
- " tex_s[2] = vec2( tex_sample.x, tex_sample.y);\n"
- " tex_s[3] = vec2(-tex_sample.x, tex_sample.y);\n"
+ " tex_s[0] = vec2(-sample.x, -sample.y);\n"
+ " tex_s[1] = vec2( sample.x, -sample.y);\n"
+ " tex_s[2] = vec2( sample.x, sample.y);\n"
+ " tex_s[3] = vec2(-sample.x, sample.y);\n"
" div_s = vec4(4, 4, 4, 4);\n"
"}\n";
Evas_GL_Program_Source shader_tex_22_nomul_afill_vert_src =
"#endif\n"
"attribute vec4 vertex;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_s[2];\n"
"{\n"
" gl_Position = mvp * vertex;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(-tex_sample.x, 0);\n"
- " tex_s[1] = vec2( tex_sample.x, 0);\n"
+ " tex_s[0] = vec2(-sample.x, 0);\n"
+ " tex_s[1] = vec2( sample.x, 0);\n"
" div_s = vec4(2, 2, 2, 2);\n"
"}\n";
Evas_GL_Program_Source shader_tex_21_nomul_afill_vert_src =
"#endif\n"
"attribute vec4 vertex;\n"
"attribute vec2 tex_coord;\n"
- "attribute vec2 tex_sample;\n"
+ "uniform vec2 sample;\n"
"uniform mat4 mvp;\n"
"varying vec2 tex_c;\n"
"varying vec2 tex_s[2];\n"
"{\n"
" gl_Position = mvp * vertex;\n"
" tex_c = tex_coord;\n"
- " tex_s[0] = vec2(0, -tex_sample.y);\n"
- " tex_s[1] = vec2(0, tex_sample.y);\n"
+ " tex_s[0] = vec2(0, -sample.y);\n"
+ " tex_s[1] = vec2(0, sample.y);\n"
" div_s = vec4(2, 2, 2, 2);\n"
"}\n";
Evas_GL_Program_Source shader_tex_12_nomul_afill_vert_src =
#endif
attribute vec4 vertex;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec2 tex_c;
varying vec2 tex_s[2];
{
gl_Position = mvp * vertex;
tex_c = tex_coord;
- tex_s[0] = vec2(0, -tex_sample.y);
- tex_s[1] = vec2(0, tex_sample.y);
+ tex_s[0] = vec2(0, -sample.y);
+ tex_s[1] = vec2(0, sample.y);
div_s = vec4(2, 2, 2, 2);
}
attribute vec4 vertex;
attribute vec4 color;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec4 col;
varying vec2 tex_c;
gl_Position = mvp * vertex;
col = color;
tex_c = tex_coord;
- tex_s[0] = vec2(0, -tex_sample.y);
- tex_s[1] = vec2(0, tex_sample.y);
+ tex_s[0] = vec2(0, -sample.y);
+ tex_s[1] = vec2(0, sample.y);
div_s = vec4(2, 2, 2, 2);
}
#endif
attribute vec4 vertex;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec2 tex_c;
varying vec2 tex_s[2];
{
gl_Position = mvp * vertex;
tex_c = tex_coord;
- tex_s[0] = vec2(0, -tex_sample.y);
- tex_s[1] = vec2(0, tex_sample.y);
+ tex_s[0] = vec2(0, -sample.y);
+ tex_s[1] = vec2(0, sample.y);
div_s = vec4(2, 2, 2, 2);
}
attribute vec4 vertex;
attribute vec4 color;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec4 col;
varying vec2 tex_c;
gl_Position = mvp * vertex;
col = color;
tex_c = tex_coord;
- tex_s[0] = vec2(0, -tex_sample.y);
- tex_s[1] = vec2(0, tex_sample.y);
+ tex_s[0] = vec2(0, -sample.y);
+ tex_s[1] = vec2(0, sample.y);
div_s = vec4(2, 2, 2, 2);
}
#endif
attribute vec4 vertex;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec2 tex_c;
varying vec2 tex_s[2];
{
gl_Position = mvp * vertex;
tex_c = tex_coord;
- tex_s[0] = vec2(-tex_sample.x, 0);
- tex_s[1] = vec2( tex_sample.x, 0);
+ tex_s[0] = vec2(-sample.x, 0);
+ tex_s[1] = vec2( sample.x, 0);
div_s = vec4(2, 2, 2, 2);
}
attribute vec4 vertex;
attribute vec4 color;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec4 col;
varying vec2 tex_c;
gl_Position = mvp * vertex;
col = color;
tex_c = tex_coord;
- tex_s[0] = vec2(-tex_sample.x, 0);
- tex_s[1] = vec2( tex_sample.x, 0);
+ tex_s[0] = vec2(-sample.x, 0);
+ tex_s[1] = vec2( sample.x, 0);
div_s = vec4(2, 2, 2, 2);
}
#endif
attribute vec4 vertex;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec2 tex_c;
varying vec2 tex_s[2];
{
gl_Position = mvp * vertex;
tex_c = tex_coord;
- tex_s[0] = vec2(-tex_sample.x, 0);
- tex_s[1] = vec2( tex_sample.x, 0);
+ tex_s[0] = vec2(-sample.x, 0);
+ tex_s[1] = vec2( sample.x, 0);
div_s = vec4(2, 2, 2, 2);
}
attribute vec4 vertex;
attribute vec4 color;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec4 col;
varying vec2 tex_c;
gl_Position = mvp * vertex;
col = color;
tex_c = tex_coord;
- tex_s[0] = vec2(-tex_sample.x, 0);
- tex_s[1] = vec2( tex_sample.x, 0);
+ tex_s[0] = vec2(-sample.x, 0);
+ tex_s[1] = vec2( sample.x, 0);
div_s = vec4(2, 2, 2, 2);
}
#endif
attribute vec4 vertex;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec2 tex_c;
varying vec2 tex_s[4];
{
gl_Position = mvp * vertex;
tex_c = tex_coord;
- tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);
- tex_s[1] = vec2( tex_sample.x, -tex_sample.y);
- tex_s[2] = vec2( tex_sample.x, tex_sample.y);
- tex_s[3] = vec2(-tex_sample.x, tex_sample.y);
+ tex_s[0] = vec2(-sample.x, -sample.y);
+ tex_s[1] = vec2( sample.x, -sample.y);
+ tex_s[2] = vec2( sample.x, sample.y);
+ tex_s[3] = vec2(-sample.x, sample.y);
div_s = vec4(4, 4, 4, 4);
}
attribute vec4 vertex;
attribute vec4 color;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec4 col;
varying vec2 tex_c;
gl_Position = mvp * vertex;
col = color;
tex_c = tex_coord;
- tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);
- tex_s[1] = vec2( tex_sample.x, -tex_sample.y);
- tex_s[2] = vec2( tex_sample.x, tex_sample.y);
- tex_s[3] = vec2(-tex_sample.x, tex_sample.y);
+ tex_s[0] = vec2(-sample.x, -sample.y);
+ tex_s[1] = vec2( sample.x, -sample.y);
+ tex_s[2] = vec2( sample.x, sample.y);
+ tex_s[3] = vec2(-sample.x, sample.y);
div_s = vec4(4, 4, 4, 4);
}
#endif
attribute vec4 vertex;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec2 tex_c;
varying vec2 tex_s[4];
{
gl_Position = mvp * vertex;
tex_c = tex_coord;
- tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);
- tex_s[1] = vec2( tex_sample.x, -tex_sample.y);
- tex_s[2] = vec2( tex_sample.x, tex_sample.y);
- tex_s[3] = vec2(-tex_sample.x, tex_sample.y);
+ tex_s[0] = vec2(-sample.x, -sample.y);
+ tex_s[1] = vec2( sample.x, -sample.y);
+ tex_s[2] = vec2( sample.x, sample.y);
+ tex_s[3] = vec2(-sample.x, sample.y);
div_s = vec4(4, 4, 4, 4);
}
attribute vec4 vertex;
attribute vec4 color;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec4 col;
varying vec2 tex_c;
gl_Position = mvp * vertex;
col = color;
tex_c = tex_coord;
- tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);
- tex_s[1] = vec2( tex_sample.x, -tex_sample.y);
- tex_s[2] = vec2( tex_sample.x, tex_sample.y);
- tex_s[3] = vec2(-tex_sample.x, tex_sample.y);
+ tex_s[0] = vec2(-sample.x, -sample.y);
+ tex_s[1] = vec2( sample.x, -sample.y);
+ tex_s[2] = vec2( sample.x, sample.y);
+ tex_s[3] = vec2(-sample.x, sample.y);
div_s = vec4(4, 4, 4, 4);
}
attribute vec4 vertex;
attribute vec4 color;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec4 col;
varying vec2 tex_c;
gl_Position = mvp * vertex;
col = color;
tex_c = tex_coord;
- tex_s[0] = vec2(0, -tex_sample.y);
- tex_s[1] = vec2(0, tex_sample.y);
+ tex_s[0] = vec2(0, -sample.y);
+ tex_s[1] = vec2(0, sample.y);
div_s = vec4(2, 2, 2, 2);
}
#endif
attribute vec4 vertex;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec2 tex_c;
varying vec2 tex_s[2];
{
gl_Position = mvp * vertex;
tex_c = tex_coord;
- tex_s[0] = vec2(0, -tex_sample.y);
- tex_s[1] = vec2(0, tex_sample.y);
+ tex_s[0] = vec2(0, -sample.y);
+ tex_s[1] = vec2(0, sample.y);
div_s = vec4(2, 2, 2, 2);
}
#endif
attribute vec4 vertex;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec2 tex_c;
varying vec2 tex_s[2];
{
gl_Position = mvp * vertex;
tex_c = tex_coord;
- tex_s[0] = vec2(0, -tex_sample.y);
- tex_s[1] = vec2(0, tex_sample.y);
+ tex_s[0] = vec2(0, -sample.y);
+ tex_s[1] = vec2(0, sample.y);
div_s = vec4(2, 2, 2, 2);
}
attribute vec4 vertex;
attribute vec4 color;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec4 col;
varying vec2 tex_c;
gl_Position = mvp * vertex;
col = color;
tex_c = tex_coord;
- tex_s[0] = vec2(0, -tex_sample.y);
- tex_s[1] = vec2(0, tex_sample.y);
+ tex_s[0] = vec2(0, -sample.y);
+ tex_s[1] = vec2(0, sample.y);
div_s = vec4(2, 2, 2, 2);
}
attribute vec4 vertex;
attribute vec4 color;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec4 col;
varying vec2 tex_c;
gl_Position = mvp * vertex;
col = color;
tex_c = tex_coord;
- tex_s[0] = vec2(-tex_sample.x, 0);
- tex_s[1] = vec2( tex_sample.x, 0);
+ tex_s[0] = vec2(-sample.x, 0);
+ tex_s[1] = vec2( sample.x, 0);
div_s = vec4(2, 2, 2, 2);
}
#endif
attribute vec4 vertex;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec2 tex_c;
varying vec2 tex_s[2];
{
gl_Position = mvp * vertex;
tex_c = tex_coord;
- tex_s[0] = vec2(-tex_sample.x, 0);
- tex_s[1] = vec2( tex_sample.x, 0);
+ tex_s[0] = vec2(-sample.x, 0);
+ tex_s[1] = vec2( sample.x, 0);
div_s = vec4(2, 2, 2, 2);
}
#endif
attribute vec4 vertex;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec2 tex_c;
varying vec2 tex_s[2];
{
gl_Position = mvp * vertex;
tex_c = tex_coord;
- tex_s[0] = vec2(-tex_sample.x, 0);
- tex_s[1] = vec2( tex_sample.x, 0);
+ tex_s[0] = vec2(-sample.x, 0);
+ tex_s[1] = vec2( sample.x, 0);
div_s = vec4(2, 2, 2, 2);
}
attribute vec4 vertex;
attribute vec4 color;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec4 col;
varying vec2 tex_c;
gl_Position = mvp * vertex;
col = color;
tex_c = tex_coord;
- tex_s[0] = vec2(-tex_sample.x, 0);
- tex_s[1] = vec2( tex_sample.x, 0);
+ tex_s[0] = vec2(-sample.x, 0);
+ tex_s[1] = vec2( sample.x, 0);
div_s = vec4(2, 2, 2, 2);
}
attribute vec4 vertex;
attribute vec4 color;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec4 col;
varying vec2 tex_c;
gl_Position = mvp * vertex;
col = color;
tex_c = tex_coord;
- tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);
- tex_s[1] = vec2( tex_sample.x, -tex_sample.y);
- tex_s[2] = vec2( tex_sample.x, tex_sample.y);
- tex_s[3] = vec2(-tex_sample.x, tex_sample.y);
+ tex_s[0] = vec2(-sample.x, -sample.y);
+ tex_s[1] = vec2( sample.x, -sample.y);
+ tex_s[2] = vec2( sample.x, sample.y);
+ tex_s[3] = vec2(-sample.x, sample.y);
div_s = vec4(4, 4, 4, 4);
}
#endif
attribute vec4 vertex;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec2 tex_c;
varying vec2 tex_s[4];
{
gl_Position = mvp * vertex;
tex_c = tex_coord;
- tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);
- tex_s[1] = vec2( tex_sample.x, -tex_sample.y);
- tex_s[2] = vec2( tex_sample.x, tex_sample.y);
- tex_s[3] = vec2(-tex_sample.x, tex_sample.y);
+ tex_s[0] = vec2(-sample.x, -sample.y);
+ tex_s[1] = vec2( sample.x, -sample.y);
+ tex_s[2] = vec2( sample.x, sample.y);
+ tex_s[3] = vec2(-sample.x, sample.y);
div_s = vec4(4, 4, 4, 4);
}
#endif
attribute vec4 vertex;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec2 tex_c;
varying vec2 tex_s[4];
{
gl_Position = mvp * vertex;
tex_c = tex_coord;
- tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);
- tex_s[1] = vec2( tex_sample.x, -tex_sample.y);
- tex_s[2] = vec2( tex_sample.x, tex_sample.y);
- tex_s[3] = vec2(-tex_sample.x, tex_sample.y);
+ tex_s[0] = vec2(-sample.x, -sample.y);
+ tex_s[1] = vec2( sample.x, -sample.y);
+ tex_s[2] = vec2( sample.x, sample.y);
+ tex_s[3] = vec2(-sample.x, sample.y);
div_s = vec4(4, 4, 4, 4);
}
attribute vec4 vertex;
attribute vec4 color;
attribute vec2 tex_coord;
-attribute vec2 tex_sample;
+uniform vec2 sample;
uniform mat4 mvp;
varying vec4 col;
varying vec2 tex_c;
gl_Position = mvp * vertex;
col = color;
tex_c = tex_coord;
- tex_s[0] = vec2(-tex_sample.x, -tex_sample.y);
- tex_s[1] = vec2( tex_sample.x, -tex_sample.y);
- tex_s[2] = vec2( tex_sample.x, tex_sample.y);
- tex_s[3] = vec2(-tex_sample.x, tex_sample.y);
+ tex_s[0] = vec2(-sample.x, -sample.y);
+ tex_s[1] = vec2( sample.x, -sample.y);
+ tex_s[2] = vec2( sample.x, sample.y);
+ tex_s[3] = vec2(-sample.x, sample.y);
div_s = vec4(4, 4, 4, 4);
}