blob: 200215c7c9497c19495be6a6b229e26ae42c0c33 (
plain)
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
|
// ----- Vertex Shader -----
#version 330 core
layout(location = 0) in vec3 position;
uniform mat4 projection;
uniform mat4 model;
void main(){
gl_Position = projection * model * vec4(position,1);
}
// ----- Fragment Shader -----
#version 330 core
uniform vec2 resolution;
uniform float time;
out vec3 color;
void main(){
vec2 coord=gl_FragCoord.xy/resolution;
coord-=0.5;
float d=length(coord);
color=vec3(d,1,1);
}
|