2013-12-29 13:23:36 -05:00
|
|
|
#version 130
|
2013-12-31 20:11:44 -05:00
|
|
|
uniform mat4 ProjectionMatrix;
|
|
|
|
uniform mat4 ViewMatrix;
|
2013-12-31 12:25:10 -05:00
|
|
|
|
2013-12-31 15:39:00 -05:00
|
|
|
in vec2 quadcorner;
|
|
|
|
in vec2 texcoord;
|
2013-12-29 14:24:19 -05:00
|
|
|
in vec3 position;
|
2013-12-31 12:25:10 -05:00
|
|
|
in float lifetime;
|
2013-12-31 20:11:44 -05:00
|
|
|
in float size;
|
2013-12-31 12:25:10 -05:00
|
|
|
|
|
|
|
out float lf;
|
2013-12-31 15:39:00 -05:00
|
|
|
out vec2 tc;
|
2013-12-29 13:23:36 -05:00
|
|
|
|
|
|
|
void main(void)
|
|
|
|
{
|
2013-12-31 15:39:00 -05:00
|
|
|
tc = texcoord;
|
2013-12-31 12:25:10 -05:00
|
|
|
lf = lifetime;
|
2013-12-31 20:11:44 -05:00
|
|
|
vec4 viewpos = ViewMatrix * vec4(position, 1.0);
|
|
|
|
viewpos += size * vec4(quadcorner, 0., 0.);
|
|
|
|
gl_Position = ProjectionMatrix * viewpos;
|
2013-12-29 13:23:36 -05:00
|
|
|
}
|