summaryrefslogtreecommitdiff
path: root/shaders/vertex.glsl
blob: 2383346bb8d95a12bc6d490cd34ab041e6849719 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
attribute vec2 a_position;
attribute float a_size;
attribute vec3 a_color;

uniform mat4 u_matrix;
uniform float u_time;

varying vec3 v_color;

void main() {
    // Simple particle position with subtle time-based variation
    vec4 position = vec4(a_position, 0.0, 1.0);
    position.x += sin(u_time * 0.001 + a_position.y * 0.01) * 0.05;
    position.y += cos(u_time * 0.0005 + a_position.x * 0.01) * 0.02;

    gl_Position = u_matrix * position;
    gl_PointSize = a_size;

    v_color = a_color;
}