#version 150 uniform mat4 viewProjectionMatrix; uniform float time; uniform bool bottom; uniform bool left; layout(points) in; layout(triangle_strip, max_vertices = 146) out; in vec3 Color[]; out vec3 fColor; const float PI = 3.1415926; const float transition_point = 1.178097; const float sin_p1 = 0.4; const float sin_p2 = 2; const float ex_p1 = 1.093; const float ex_p2 = 1.9996; const float begin = 0; const float end = 2.5; float radiusFunction(float x) { if (x < transition_point) { return sin_p1 * sin(sin_p2 * x); } else { return exp(ex_p1 - ex_p2 * x); } } void main() { fColor = Color[0]; float resolution = 8.0; float step = abs(end-begin)/resolution/2.0; float i = 0.0; float render_end = 0.0; if (bottom) { i = begin; render_end = (end-begin)/2.0+step; } else { i = (end-begin)/2.0; render_end = end; } for (i; i