#ifdef GL_ES
precision highp float;

attribute highp vec4 a_transformRow1;
attribute highp vec2 a_transformRow2;
attribute highp vec2 a_vertexPosition;
attribute highp vec2 a_texCoord;
attribute highp vec4 a_color;

uniform highp mat4 u_viewMatrix;
uniform highp mat4 u_projectionMatrix;

varying highp vec4 v_color;
#else
attribute vec4 a_transformRow1;
attribute vec2 a_transformRow2;
attribute vec2 a_vertexPosition;
attribute vec2 a_texCoord;
attribute vec4 a_color;

uniform mat4 u_viewMatrix;
uniform mat4 u_projectionMatrix;

varying vec4 v_color;
#endif

void main() {
	mat4 m = mat4(
		1, 0, 0, 0,
		0, 1, 0, 0,
		0, 0, 1, 0,
		a_transformRow2[0], a_transformRow2[1], 0, 1);


	#ifdef GL_ES
	highp vec4 v = vec4(a_vertexPosition, 0.0, 1.0);
	/*highp vec4 v1 = m * v;*/
	highp vec4 v2 = u_viewMatrix * v;
	highp vec4 v3 = u_projectionMatrix * v2;
	#else
	vec4 v = vec4(a_vertexPosition, 0.0, 1.0);
	/*vec4 v1 = m * v;*/
	vec4 v2 = u_viewMatrix * v;
	vec4 v3 = u_projectionMatrix * v2;
	#endif

	gl_Position = v3;
	v_color = a_color;
}

