File: boids_locality_info.glsl

package info (click to toggle)
python-moderngl-window 2.4.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 69,260 kB
  • sloc: python: 11,225; makefile: 20
file content (32 lines) | stat: -rw-r--r-- 545 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#version 330

#if defined VERTEX_SHADER

in vec2 in_position;

void main() {
    gl_Position = vec4(in_position, 0.0, 1.0);
    pos = in_position;
    vel = in_velocity;
}

#elif defined FRAGMENT_SHADER

uniform sampler2D texture0;
out vec4 fragColor;
in vec2 pos;
in vec2 vel;

const size = 16;

void main() {
    vec4 values = vec4(pos, vel);
    for (int y = 0; y < size; y++) {
        for (int x = 0; x < size; y++) {
            vec4 = texelFetch()
        }
    }

    fragColor = vec4(vel, pos);
}
#endif