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

16 lines
349 B
Plaintext
Raw Permalink Normal View History

2024-08-12 15:21:02 +00:00
//#version 330 core
2023-09-08 09:19:33 +00:00
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();
}