diff --git a/demos/99-geom.c b/demos/99-geom.c index 0a4cea9..1096511 100644 --- a/demos/99-geom.c +++ b/demos/99-geom.c @@ -21,6 +21,7 @@ int main() { if (input(KEY_F5)) window_reload(); shader_bind(program); + shader_float("t", (float)window_time()); mesh_render_prim(&m, GL_POINTS); } diff --git a/demos/art/shaders/geom-test/line.glsl b/demos/art/shaders/geom-test/line.glsl index 26560ba..0086d75 100644 --- a/demos/art/shaders/geom-test/line.glsl +++ b/demos/art/shaders/geom-test/line.glsl @@ -1,12 +1,14 @@ #version 330 core layout (points) in; layout (line_strip, max_vertices = 2) out; + +uniform float t; void main() { - gl_Position = gl_in[0].gl_Position + vec4(-0.1, 0.0, 0.0, 0.0); + gl_Position = gl_in[0].gl_Position + vec4(-0.1 + sin(t)*0.1, 0.0, 0.0, 0.0); EmitVertex(); - gl_Position = gl_in[0].gl_Position + vec4( 0.1, 0.0, 0.0, 0.0); + gl_Position = gl_in[0].gl_Position + vec4( 0.1 - sin(t)*0.1, 0.0, 0.0, 0.0); EmitVertex(); EndPrimitive(); diff --git a/engine/v4k.html b/engine/v4k.html index 25307ac..bb9b7e2 100644 --- a/engine/v4k.html +++ b/engine/v4k.html @@ -596,7 +596,7 @@ details > summary::-webkit-details-marker { |Version: | 2023.7 | |:--------------|:------------| |Branch: | main | -|Commit: | 69 | +|Commit: | 70 | # [V·4·K 2023.7 ](https://dev.v4.games/zaklaus/v4k)