mesh_render_prim addition
parent
cf45869d14
commit
d1204acada
|
@ -21,6 +21,7 @@ int main() {
|
||||||
if (input(KEY_F5)) window_reload();
|
if (input(KEY_F5)) window_reload();
|
||||||
|
|
||||||
shader_bind(program);
|
shader_bind(program);
|
||||||
|
shader_float("t", (float)window_time());
|
||||||
mesh_render_prim(&m, GL_POINTS);
|
mesh_render_prim(&m, GL_POINTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,13 @@
|
||||||
layout (points) in;
|
layout (points) in;
|
||||||
layout (line_strip, max_vertices = 2) out;
|
layout (line_strip, max_vertices = 2) out;
|
||||||
|
|
||||||
|
uniform float t;
|
||||||
|
|
||||||
void main() {
|
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();
|
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();
|
EmitVertex();
|
||||||
|
|
||||||
EndPrimitive();
|
EndPrimitive();
|
||||||
|
|
|
@ -596,7 +596,7 @@ details > summary::-webkit-details-marker {
|
||||||
|Version: | 2023.7 |
|
|Version: | 2023.7 |
|
||||||
|:--------------|:------------|
|
|:--------------|:------------|
|
||||||
|Branch: | main |
|
|Branch: | main |
|
||||||
|Commit: | 69 |
|
|Commit: | 70 |
|
||||||
<!--| Documentation last modified | { {LAST_MODIFIED} } |-->
|
<!--| Documentation last modified | { {LAST_MODIFIED} } |-->
|
||||||
|
|
||||||
# [V·4·K 2023.7 ](https://dev.v4.games/zaklaus/v4k)
|
# [V·4·K 2023.7 ](https://dev.v4.games/zaklaus/v4k)
|
||||||
|
|
Loading…
Reference in New Issue