resources/images/rocks.jpg \
resources/images/four_NM_height.tga \
resources/images/rocks_NM_height.tga \
+resources/images/grid.png \
+resources/images/grid_n.png \
resources/models/mesh_for_mmap.eet \
resources/models/mesh_for_mmap.md2 \
resources/models/mesh_for_mmap.obj \
* @see evas_3d_object_callback_register
*
* @verbatim
- * gcc -o gcc -o evas-3d-shadows evas-3d-shadows.c evas-3d-primitives.c `pkg-config --libs --cflags efl evas ecore ecore-evas eo eina` -lm
+ * gcc -o evas-3d-shadows evas-3d-shadows.c evas-3d-primitives.c `pkg-config --libs --cflags efl evas ecore ecore-evas eo eina` -lm
* @endverbatim
*/
#define SPECULAR_LIGHT 1.0, 1.0, 1.0
static const char *model_path = PACKAGE_EXAMPLES_DIR EVAS_MODEL_FOLDER "/sonic.md2";
-static const char *image_path = PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/sonic.png";
+
static const vec2 tex_scale = {1, 1};
+static const vec2 fence_tex_scale = {80, 6};
Ecore_Evas *ecore_evas = NULL;
Evas *evas = NULL;
Eo *image = NULL;
Evas_3D_Node *choosed_node = NULL;
-typedef struct _Body_3D
-{
- Eo *material;
- Eo *mesh;
- Eo *node;
-} Body_3D;
-
-typedef struct _Scene_Data
-{
- Eo *scene;
- Eo *root_node;
- Eo *camera_node;
- Eo *camera;
- Eo *light_node;
- Eo *light;
-
- Body_3D sphere;
- Body_3D cube;
- Body_3D square;
- Body_3D cylinder;
- Body_3D model;
- Body_3D cone;
-} Scene_Data;
-
Eina_Bool
_cb_clicked(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info)
{
return EINA_TRUE;
}
+typedef struct _Body_3D
+{
+ Eo *material;
+ Eo *mesh;
+ Eo *node;
+} Body_3D;
+
+typedef struct _Scene_Data
+{
+ Eo *scene;
+ Eo *root_node;
+ Eo *camera_node;
+ Eo *camera;
+ Eo *light_node;
+ Eo *light;
+
+ Body_3D sphere;
+ Body_3D cube;
+ Body_3D square;
+ Body_3D cylinder;
+ Body_3D model;
+ Body_3D cone;
+ Body_3D fence;
+} Scene_Data;
+
static void
_show_help()
{
}
static void
+_fence_setup(Body_3D *fence)
+{
+
+ Eo *texture = eo_add(EVAS_3D_TEXTURE_CLASS, evas);
+ eo_do(texture,
+ evas_3d_texture_file_set(PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid.png", NULL),
+ evas_3d_texture_filter_set(EVAS_3D_TEXTURE_FILTER_NEAREST,
+ EVAS_3D_TEXTURE_FILTER_NEAREST),
+ evas_3d_texture_wrap_set(EVAS_3D_WRAP_MODE_REPEAT,
+ EVAS_3D_WRAP_MODE_REPEAT));
+ Eo *texture1 = eo_add(EVAS_3D_TEXTURE_CLASS, evas);
+ eo_do(texture1,
+ evas_3d_texture_file_set(PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid_n.png", NULL),
+ evas_3d_texture_filter_set(EVAS_3D_TEXTURE_FILTER_NEAREST,
+ EVAS_3D_TEXTURE_FILTER_NEAREST),
+ evas_3d_texture_wrap_set(EVAS_3D_WRAP_MODE_REPEAT,
+ EVAS_3D_WRAP_MODE_REPEAT));
+ fence->material = eo_add(EVAS_3D_MATERIAL_CLASS, evas);
+
+ eo_do(fence->material,
+ evas_3d_material_texture_set(EVAS_3D_MATERIAL_DIFFUSE, texture),
+ evas_3d_material_texture_set(EVAS_3D_MATERIAL_AMBIENT, texture),
+ evas_3d_material_enable_set(EVAS_3D_MATERIAL_AMBIENT, EINA_TRUE),
+ evas_3d_material_enable_set(EVAS_3D_MATERIAL_DIFFUSE, EINA_TRUE),
+ evas_3d_material_enable_set(EVAS_3D_MATERIAL_SPECULAR, EINA_TRUE),
+ evas_3d_material_enable_set(EVAS_3D_MATERIAL_NORMAL, EINA_TRUE),
+ evas_3d_material_texture_set(EVAS_3D_MATERIAL_NORMAL, texture1),
+ evas_3d_material_shininess_set(100.0));
+ fence->mesh = eo_add(EVAS_3D_MESH_CLASS, evas);
+ evas_3d_add_cylinder_frame(fence->mesh, 0, 50, fence_tex_scale);
+
+ eo_do(fence->mesh,
+ evas_3d_mesh_frame_material_set(0, fence->material),
+ evas_3d_mesh_alpha_func_set(EVAS_3D_COMPARISON_GREATER, 0),
+ evas_3d_mesh_alpha_test_enable_set(EINA_TRUE),
+ evas_3d_mesh_shade_mode_set(EVAS_3D_SHADE_MODE_NORMAL_MAP));
+ fence->node =
+ eo_add(EVAS_3D_NODE_CLASS, evas,
+ evas_3d_node_constructor(EVAS_3D_NODE_TYPE_MESH));
+ eo_do(fence->node, evas_3d_node_mesh_add(fence->mesh),
+ evas_3d_node_scale_set(7.0, 3.0, 7.0),
+ evas_3d_node_position_set(0.0, 0.5, -5.0));
+}
+
+static void
_square_setup(Body_3D *square)
{
square->mesh = eo_add(EVAS_3D_MESH_CLASS, evas);
{
Eo *texture = eo_add(EVAS_3D_TEXTURE_CLASS, evas);
eo_do(texture,
- evas_3d_texture_file_set(image_path, NULL),
+ evas_3d_texture_file_set(PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/sonic.png", NULL),
evas_3d_texture_filter_set(EVAS_3D_TEXTURE_FILTER_NEAREST,
EVAS_3D_TEXTURE_FILTER_NEAREST),
evas_3d_texture_wrap_set(EVAS_3D_WRAP_MODE_REPEAT,
evas_3d_light_ambient_set(AMBIENT_LIGHT, 1.0),
evas_3d_light_diffuse_set(DIFFUSE_LIGHT, 1.0),
evas_3d_light_specular_set(SPECULAR_LIGHT, 1.0),
- evas_3d_light_projection_perspective_set(45.0, 1.0, 2.0, 1000.0));
+ evas_3d_light_spot_cutoff_set(20),
+ evas_3d_light_projection_perspective_set(40.0, 1.0, 2.0, 1000.0));
data->light_node =
eo_add(EVAS_3D_NODE_CLASS, evas,
eo_do(data->light_node,
evas_3d_node_light_set(data->light),
evas_3d_node_position_set(50.0, 50.0, 20.0),
- evas_3d_node_look_at_set(EVAS_3D_SPACE_PARENT, 0.0, 0.0, 20.0,
+ evas_3d_node_look_at_set(EVAS_3D_SPACE_PARENT, 15.0, 0.0, -5.0,
EVAS_3D_SPACE_PARENT, 0.0, 0.0, 1.0));
eo_do(data->root_node, evas_3d_node_member_add(data->light_node));
}
_square_setup(&data->square);
_model_setup(&data->model);
_cone_setup(&data->cone);
-
- eo_do(data->root_node, evas_3d_node_member_add(data->sphere.node));
- eo_do(data->root_node, evas_3d_node_member_add(data->cube.node));
- eo_do(data->root_node, evas_3d_node_member_add(data->cylinder.node));
- eo_do(data->root_node, evas_3d_node_member_add(data->square.node));
- eo_do(data->root_node, evas_3d_node_member_add(data->model.node));
- eo_do(data->root_node, evas_3d_node_member_add(data->cone.node));
+ _fence_setup(&data->fence);
+
+ eo_do(data->root_node,
+ evas_3d_node_member_add(data->sphere.node),
+ evas_3d_node_member_add(data->cube.node),
+ evas_3d_node_member_add(data->cylinder.node),
+ evas_3d_node_member_add(data->square.node),
+ evas_3d_node_member_add(data->model.node),
+ evas_3d_node_member_add(data->cone.node),
+ evas_3d_node_member_add(data->fence.node));
eo_do(data->scene,
evas_3d_scene_root_node_set(data->root_node),
EVAS_3D_STATE_MESH_SHADE_MODE,
EVAS_3D_STATE_MESH_FOG,
EVAS_3D_STATE_MESH_BLENDING,
+ EVAS_3D_STATE_MESH_ALPHA_TEST,
EVAS_3D_STATE_MESH_COLOR_PICK,
EVAS_3D_STATE_CAMERA_PROJECTION = 1,
} Evas_3D_Blend_Func;
/**
+ * Comparsion functions for testing(alpha, depth, stencil) in fragment shader.
+ *
+ * @since 1.14
+ * @ingroup Evas_3D_Types
+ */
+typedef enum _Evas_3D_Comparison
+{
+ /**< Never passes.*/
+ EVAS_3D_COMPARISON_NEVER,
+ /**< Passes if the incoming value is less than the reference value.*/
+ EVAS_3D_COMPARISON_LESS,
+ /**< Passes if the incoming value is equal to the reference value.*/
+ EVAS_3D_COMPARISON_EQUAL,
+ /**< Passes if the incoming value is less than or equal to the reference value.*/
+ EVAS_3D_COMPARISON_LEQUAL,
+ /**< Passes if the incoming value is greater than the reference value.*/
+ EVAS_3D_COMPARISON_GREATER,
+ /**< Passes if the incoming value is not equal to the reference value.*/
+ EVAS_3D_COMPARISON_NOTEQUAL,
+ /**< Passes if the incoming value is greater than or equal to the reference value.*/
+ EVAS_3D_COMPARISON_GEQUAL,
+ /**< Always passes (initial value).*/
+ EVAS_3D_COMPARISON_ALWAYS,
+} Evas_3D_Comparison;
+
+/**
* Color formats of pixel data
*
* @since 1.10
pd->blend_dfactor = EVAS_3D_BLEND_ZERO;
pd->blending = EINA_FALSE;
+ pd->alpha_comparison = EVAS_3D_COMPARISON_ALWAYS;
+ pd->alpha_ref_value = 0.0f;
+ pd->alpha_test_enabled = EINA_FALSE;
+
pd->color_pick_key = -1.0;
pd->color_pick_enabled = EINA_FALSE;
}
}
EOLIAN static void
+_evas_3d_mesh_alpha_func_set(Eo *obj, Evas_3D_Mesh_Data *pd, Evas_3D_Comparison comparison,
+ Evas_Real ref_value)
+{
+ if (pd->alpha_comparison == comparison && pd->alpha_ref_value == ref_value)
+ return;
+ pd->alpha_comparison = comparison;
+ pd->alpha_ref_value = ref_value;
+ eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_ALPHA_TEST, NULL));
+}
+
+EOLIAN static void
+_evas_3d_mesh_alpha_func_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd,
+ Evas_3D_Comparison *comparison,
+ Evas_Real *ref_value)
+{
+ if (comparison) *comparison = pd->alpha_comparison;
+ if (ref_value) *ref_value = pd->alpha_ref_value;
+}
+
+EOLIAN static void
+_evas_3d_mesh_alpha_test_enable_set(Eo *obj, Evas_3D_Mesh_Data *pd, Eina_Bool enabled)
+{
+ pd->alpha_test_enabled = enabled;
+ eo_do(obj, evas_3d_object_change(EVAS_3D_STATE_MESH_ALPHA_TEST, NULL));
+}
+
+EOLIAN static Eina_Bool
+_evas_3d_mesh_alpha_test_enable_get(Eo *obj EINA_UNUSED, Evas_3D_Mesh_Data *pd)
+{
+ return pd->alpha_test_enabled;
+}
+
+EOLIAN static void
_evas_3d_mesh_mmap_set(Eo *obj, Evas_3D_Mesh_Data *pd,
Eina_File *file, const char *key EINA_UNUSED)
{
Eina_Bool enabled; /*@ Fog enabled status.*/
}
}
+
+ alpha_test_enable {
+ set {
+ /**
+ * Get the enable status of alpha test for given mesh
+ *
+ * Default alpha test disabled.
+ *
+ * @ingroup Evas_3D_Mesh
+ */
+ }
+ get {
+ /**
+ * Get the enable status of alpha test for given mesh
+ *
+ * @see alpha_test_enable_set()
+ *
+ * @ingroup Evas_3D_Mesh
+ */
+ }
+ values {
+ Eina_Bool enabled; /*@ Alpha test status.*/
+ }
+ }
+
+ alpha_func {
+ set {
+ /*
+ * The alpha test discards fragments depending on the outcome of a comparison
+ * between an incoming fragment's alpha value and a constant reference value
+ * This func specifies the reference value and the comparison function.
+ *
+ * @ingroup Evas_3D_Mesh
+ */
+ }
+ get {
+ /*
+ * Get the reference value and the comparison function for alpha testing
+ *
+ * @see eavs_3d_mesh_alpha_test_param_set()
+ *
+ * @ingroup Evas_3D_Mesh
+ */
+ }
+ values {
+ Evas_3D_Comparison comparison_func; /*@ Specifies the alpha comparison function.*/
+ Evas_Real ref_value; /*@ Specifies the reference value that incoming alpha values are compared to.*/
+ }
+ }
+
blending_enable {
set {
/**
Evas_3D_Blend_Func blend_sfactor;
Evas_3D_Blend_Func blend_dfactor;
+ Evas_3D_Comparison alpha_comparison;
+ Evas_Real alpha_ref_value;
+ Eina_Bool alpha_test_enabled :1;
+
Evas_Color fog_color;
Eina_Bool fog_enabled :1;
data->flags |= E3D_SHADER_FLAG_FOG_ENABLED;
data->fog_color = pdmesh->fog_color;
}
+ if (pdmesh->alpha_test_enabled)
+ data->flags |= E3D_SHADER_FLAG_ALPHA_TEST_ENABLED;
if (pdmesh->shadowed)
data->flags |= E3D_SHADER_FLAG_SHADOWED;
if (pdmesh->color_pick_enabled)
data->color_pick_key = pdmesh->color_pick_key;
+ data->alpha_comparison = pdmesh->alpha_comparison;
+ data->alpha_ref_value = pdmesh->alpha_ref_value;
+ data->alpha_test_enabled =pdmesh->alpha_test_enabled;
+
data->blending = pdmesh->blending;
data->blend_sfactor = pdmesh->blend_sfactor;
data->blend_dfactor = pdmesh->blend_dfactor;
else if (pdmesh->shade_mode == EVAS_3D_SHADE_MODE_SHADOW_MAP_RENDER)
{
BUILD(vertex_attrib, VERTEX_POSITION, EINA_TRUE);
+ if (pdmesh->alpha_test_enabled)
+ {
+ BUILD(material_texture, MATERIAL_DIFFUSE, EINA_FALSE);
+
+ if (_flags_need_tex_coord(data->flags))
+ BUILD(vertex_attrib, VERTEX_TEXCOORD, EINA_FALSE);
+ }
}
else if (pdmesh->shade_mode == EVAS_3D_SHADE_MODE_COLOR_PICK)
{
#define E3D_SHADER_FLAG_EMISSION_TEXTURE_BLEND (1 << 26)
#define E3D_SHADER_FLAG_NORMAL_TEXTURE_BLEND (1 << 27)
#define E3D_SHADER_FLAG_FOG_ENABLED (1 << 28)
-#define E3D_SHADER_FLAG_SHADOWED (1 << 29)
-#define E3D_SHADER_FLAG_COUNT 30
+#define E3D_SHADER_FLAG_ALPHA_TEST_ENABLED (1 << 29)
+#define E3D_SHADER_FLAG_SHADOWED (1 << 30)
+#define E3D_SHADER_FLAG_COUNT 31
static inline Eina_Bool
_flags_need_tex_coord(E3D_Shader_Flag flags)
Evas_3D_Blend_Func blend_dfactor;
Eina_Bool blending : 1;
+ Evas_3D_Comparison alpha_comparison;
+ Evas_Real alpha_ref_value;
+ Eina_Bool alpha_test_enabled :1;
+
struct {
Evas_Vec4 position;
Evas_Vec3 spot_dir;
}
}
+static inline GLenum
+_gl_comparison_func_get(Evas_3D_Comparison comparison_func)
+{
+ switch (comparison_func)
+ {
+ case EVAS_3D_COMPARISON_NEVER:
+ return GL_NEVER;
+ case EVAS_3D_COMPARISON_LESS:
+ return GL_LESS;
+ case EVAS_3D_COMPARISON_EQUAL:
+ return GL_EQUAL;
+ case EVAS_3D_COMPARISON_LEQUAL:
+ return GL_LEQUAL;
+ case EVAS_3D_COMPARISON_GREATER:
+ return GL_GREATER;
+ case EVAS_3D_COMPARISON_NOTEQUAL:
+ return GL_NOTEQUAL;
+ case EVAS_3D_COMPARISON_GEQUAL:
+ return GL_GEQUAL;
+ case EVAS_3D_COMPARISON_ALWAYS:
+ return GL_ALWAYS;
+ default:
+ return GL_ALWAYS;
+ }
+}
+
static inline void
_renderer_vertex_attrib_array_enable(E3D_Renderer *renderer, int index)
{
_renderer_program_use(renderer, program);
e3d_program_uniform_upload(program, data);
- if (data->mode != EVAS_3D_SHADE_MODE_SHADOW_MAP_RENDER)
_renderer_texture_bind(renderer, data);
/* Set up vertex attrib pointers. */
}
else glDisable(GL_BLEND);
+ if (data->alpha_test_enabled)
+ {
+ glEnable(GL_ALPHA_TEST);
+ glAlphaFunc(_gl_comparison_func_get(data->alpha_comparison),
+ (GLclampf)data->alpha_ref_value);
+ }
+ else glDisable(GL_ALPHA_TEST);
+
if (data->indices)
{
_renderer_elements_draw(renderer, data->assembly, data->index_count,
"EMISSION_TEXTURE_BLEND",
"NORMAL_TEXTURE_BLEND",
"FOG_ENABLED",
+ "ALPHA_TEST_ENABLED",
"SHADOWED"
};
"attribute vec4 aPosition1;\n"
"uniform float uPositionWeight;\n"
"#endif //VERTEX_POSITION_BLEND\n"
+ "#ifdef ALPHA_TEST_ENABLED\n"
+ "#ifdef VERTEX_TEXCOORD\n"
+ "attribute vec4 aTexCoord0;\n"
+ "#endif //VERTEX_TEXCOORD\n"
+ "#ifdef VERTEX_TEXCOORD_BLEND\n"
+ "attribute vec4 aTexCoord1;\n"
+ "uniform float uTexCoordWeight;\n"
+ "#endif //VERTEX_TEXCOORD_BLEND\n"
+ "#ifdef NEED_TEX_COORD\n"
+ "varying vec2 vTexCoord;\n"
+ "#endif //TEX_COORD\n"
+ "#endif //ALPHA_TEST_ENABLED\n"
"void main()\n"
"{\n"
"#ifdef VERTEX_POSITION_BLEND\n"
" vec4 position = vec4(aPosition0.xyz, 1.0);\n"
"#endif // VERTEX_POSITION\n"
"#endif //VERTEX_POSITION_BLEND\n"
+ "#ifdef ALPHA_TEST_ENABLED\n"
+ "#ifdef VERTEX_TEXCOORD_BLEND\n"
+ " vTexCoord = aTexCoord0.st * uTexCoordWeight +\n"
+ " aTexCoord1.st * (1.0 - uTexCoordWeight);\n"
+ "#else\n"
+ "#ifdef VERTEX_TEXCOORD\n"
+ " vTexCoord = aTexCoord0.st;\n"
+ "#endif //VERTEX_TEXCOORD\n"
+ "#endif //VERTEX_TEXCOORD_BLEND\n"
+ "#endif //ALPHA_TEST_ENABLED\n"
" gl_Position = uMatrixMvp * position;\n"
"}\n";
static const char const shadow_map_frag_glsl[] =
- "void main()\n"
- "{\n"
+ "#ifdef ALPHA_TEST_ENABLED\n"
+ "#ifdef NEED_TEX_COORD\n"
+ "varying vec2 vTexCoord;\n"
+ "#endif //TEX_COORD\n"
+ "#ifdef DIFFUSE\n"
+ "#ifdef DIFFUSE_TEXTURE\n"
+ "uniform sampler2D uTextureDiffuse0;\n"
+ "#endif //DIFFUSE_TEXTURE\n"
+ "#ifdef DIFFUSE_TEXTURE_BLEND\n"
+ "uniform sampler2D uTextureDiffuse1;\n"
+ "uniform float uTextureDiffuseWeight;\n"
+ "#endif //DIFFUSE_TEXTURE_BLEND\n"
+ "#endif //DIFFUSE\n"
+ "#endif //ALPHA_TEST_ENABLED\n"
+ "void main() {\n"
+ "#ifdef ALPHA_TEST_ENABLED\n"
+ "#ifdef DIFFUSE_TEXTURE_BLEND\n"
+ " gl_FragColor = (texture2D(uTextureDiffuse0, vTexCoord) *\n"
+ " uTextureDiffuseWeight + texture2D(uTextureDiffuse1, vTexCoord) *\n"
+ " (1.0 - uTextureDiffuseWeight));\n"
+ "#else\n"
+ "#ifdef DIFFUSE_TEXTURE\n"
+ " gl_FragColor = texture2D(uTextureDiffuse0, vTexCoord) ;\n"
+ "#else\n"
+ " gl_FragColor = vec4(1);\n"
+ "#endif //DIFFUSE_TEXTURE\n"
+ "#endif //DIFFUSE_TEXTURE_BLEND\n"
+ "#endif //ALPHA_TEST_ENABLED\n"
" gl_FragColor.r = gl_FragCoord.z;\n"
"}\n";
-void main()
-{
+#ifdef ALPHA_TEST_ENABLED
+
+#ifdef NEED_TEX_COORD
+varying vec2 vTexCoord;
+#endif //TEX_COORD
+
+#ifdef DIFFUSE
+
+#ifdef DIFFUSE_TEXTURE
+uniform sampler2D uTextureDiffuse0;
+#endif //DIFFUSE_TEXTURE
+
+#ifdef DIFFUSE_TEXTURE_BLEND
+uniform sampler2D uTextureDiffuse1;
+uniform float uTextureDiffuseWeight;
+#endif //DIFFUSE_TEXTURE_BLEND
+
+#endif //DIFFUSE
+
+#endif //ALPHA_TEST_ENABLED
+
+void main() {
+
+#ifdef ALPHA_TEST_ENABLED
+
+#ifdef DIFFUSE_TEXTURE_BLEND
+ gl_FragColor = (texture2D(uTextureDiffuse0, vTexCoord) *
+ uTextureDiffuseWeight + texture2D(uTextureDiffuse1, vTexCoord) *
+ (1.0 - uTextureDiffuseWeight));
+#else
+
+#ifdef DIFFUSE_TEXTURE
+ gl_FragColor = texture2D(uTextureDiffuse0, vTexCoord) ;
+#else
+ gl_FragColor = vec4(1);
+#endif //DIFFUSE_TEXTURE
+
+#endif //DIFFUSE_TEXTURE_BLEND
+
+#endif //ALPHA_TEST_ENABLED
+
gl_FragColor.r = gl_FragCoord.z;
}
uniform float uPositionWeight;
#endif //VERTEX_POSITION_BLEND
+#ifdef ALPHA_TEST_ENABLED
+
+#ifdef VERTEX_TEXCOORD
+attribute vec4 aTexCoord0;
+#endif //VERTEX_TEXCOORD
+
+#ifdef VERTEX_TEXCOORD_BLEND
+attribute vec4 aTexCoord1;
+uniform float uTexCoordWeight;
+#endif //VERTEX_TEXCOORD_BLEND
+
+#ifdef NEED_TEX_COORD
+varying vec2 vTexCoord;
+#endif //TEX_COORD
+
+#endif //ALPHA_TEST_ENABLED
+
void main()
{
#endif //VERTEX_POSITION_BLEND
+#ifdef ALPHA_TEST_ENABLED
+
+#ifdef VERTEX_TEXCOORD_BLEND
+ vTexCoord = aTexCoord0.st * uTexCoordWeight +
+ aTexCoord1.st * (1.0 - uTexCoordWeight);
+#else
+
+#ifdef VERTEX_TEXCOORD
+ vTexCoord = aTexCoord0.st;
+#endif //VERTEX_TEXCOORD
+
+#endif //VERTEX_TEXCOORD_BLEND
+
+#endif //ALPHA_TEST_ENABLED
+
gl_Position = uMatrixMvp * position;
}