2
// Vertex shader for rendering a "confetti cannon"
3
// via a partcle system
7
// Copyright (c) 2003-2004: 3Dlabs, Inc.
9
// See 3Dlabs-License.txt for license information
12
uniform float Time; // updated each frame by the application
13
uniform vec4 Background; // constant color equal to background
15
attribute vec3 Velocity; // initial velocity
16
attribute float StartTime; // time at which particle is activated
23
float t = Time - StartTime;
27
vert = gl_Vertex + vec4 (Velocity * t, 0.0);
28
vert.y -= 4.9 * t * t;
33
vert = gl_Vertex; // Initial position
34
Color = Background; // "pre-birth" color
37
gl_Position = gl_ModelViewProjectionMatrix * vert;
b'\\ No newline at end of file'