KlassischeKeplerKriege/game/renderer_polygon_3d/particle.vert

20 lines
388 B
GLSL
Raw Normal View History

2016-09-29 02:24:14 +00:00
R"raw_string(
#version 120
attribute vec2 in_vertex;
attribute vec2 in_position;
attribute vec2 in_velocity;
2016-09-29 07:05:35 +00:00
varying vec2 velocity;
2016-09-29 02:24:14 +00:00
varying vec2 vertex;
uniform float time;
uniform float size;
void main()
{
vec2 p = size*in_vertex;
2016-09-29 07:05:35 +00:00
p += log(1.0+time) * in_velocity;
2016-09-29 02:24:14 +00:00
p += in_position;
gl_Position = vec4(p, 0.0, 1.0);
2016-09-29 07:05:35 +00:00
2016-09-29 02:24:14 +00:00
vertex = in_vertex;
2016-09-29 07:05:35 +00:00
velocity = in_velocity;
2016-09-29 02:24:14 +00:00
}
)raw_string"