Help animate the dotted line

If you have access to Rhino 7 WIP, you can use GhGL:

#Vertex
layout(location = 0) in vec3 vertex;
layout(location = 1) in float t;

uniform mat4 _worldToClip;
out vec4 vertex_color;
uniform float _time;
uniform float speed;
uniform float repeat;

void main() {
  vertex_color.r = sin(repeat * (t + _time * speed));
  gl_Position = _worldToClip * vec4(vertex, 1.0);
}
#Fragment

in vec4 vertex_color;
out vec4 fragment_color;

void main() {
  fragment_color = vertex_color;
  if (fragment_color.r > 0) {
      discard;
  }
}

GhGl.gh (6.3 KB)

4 Likes