v4k-git-backup/demos/art/shaders/geom-test/line.glsl

16 lines
347 B
Plaintext
Raw Normal View History

2023-09-08 09:19:33 +00:00
#version 330 core
layout (points) in;
layout (line_strip, max_vertices = 2) out;
2023-09-08 09:41:51 +00:00
uniform float t;
2023-09-08 09:19:33 +00:00
void main() {
2023-09-08 09:41:51 +00:00
gl_Position = gl_in[0].gl_Position + vec4(-0.1 + sin(t)*0.1, 0.0, 0.0, 0.0);
2023-09-08 09:19:33 +00:00
EmitVertex();
2023-09-08 09:41:51 +00:00
gl_Position = gl_in[0].gl_Position + vec4( 0.1 - sin(t)*0.1, 0.0, 0.0, 0.0);
2023-09-08 09:19:33 +00:00
EmitVertex();
EndPrimitive();
}