mesh_render_prim addition

main
Dominik Madarász 2023-09-08 11:41:51 +02:00
parent cf45869d14
commit d1204acada
3 changed files with 6 additions and 3 deletions

View File

@ -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);
}

View File

@ -2,11 +2,13 @@
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();

View File

@ -596,7 +596,7 @@ details > summary::-webkit-details-marker {
|Version: | 2023.7 |
|:--------------|:------------|
|Branch: | main |
|Commit: | 69 |
|Commit: | 70 |
<!--| Documentation last modified | { {LAST_MODIFIED} } |-->
# [V·4·K 2023.7 ](https://dev.v4.games/zaklaus/v4k)