1 uniform float beam_len;
5 float dist = gl_Vertex.z;
6 float s = (dist + 1.0) * 1.6;
8 vec4 pos = gl_Vertex * vec4(s, s, 1.0, 1.0);
10 gl_Position = gl_ModelViewProjectionMatrix * pos;
12 float d = dist / beam_len;
13 float falloff = min(1.0 - d, 1.0);
14 gl_FrontColor = vec4(gl_Color.xyz, gl_Color.a * falloff);