#version 330 core

in vec3 gs_oldPosition[1];
in vec3 gs_forces[1];
in vec3 gs_params[1]; // radius, ?, active

out vec3 position;
out vec3 oldPosition;
out vec3 forces;
out vec3 params; // radius, ?, active

layout(points) in;
layout(points, max_vertices = 1) out;

void main()
{
	vec3 pos = gl_in[0].gl_Position.xyz;
	vec3 oldPos = gs_oldPosition[0];
	if ( gs_params[0].z > 0.0 )
	{
		// apply physics here
	}
	position = pos;
	oldPosition = oldPos;
	forces = gs_forces[0];
	params = gs_params[0];
	EmitVertex();
	EndPrimitive();
}
