precision mediump float;

uniform mat4 modelmat;
uniform mat4 pmat;
uniform float t;

attribute vec3 position;
attribute vec3 cposition;
varying vec3 apos;

void main() {
	vec3 blend = mix(position, cposition, .5 * (1.0 - cos(t)));
	/*float breath1 = 1.0 + .1 * sin(2.9 * t) * sin(.1 * t);
	float breath2 = 1.0 + .1 * cos(3.1 * t) * sin(.07 * t);
	blend.x *= breath2;
	blend.y *= breath1;
	blend.z *= 1.0 / (breath1 * breath2);*/
	
	gl_Position = pmat * modelmat * vec4(blend, 1.0);
	gl_PointSize = 1.0;
	apos = position;
}
precision mediump float;

void main() {
	gl_FragColor = vec4(1.0);
}