dashed_lines.vs 390 B

1234567891011121314151617
  1. #version 100
  2. // see as reference: https://stackoverflow.com/questions/52928678/dashed-line-in-opengl3
  3. uniform mat4 view_model_matrix;
  4. uniform mat4 projection_matrix;
  5. // v_position.w = coordinate along the line
  6. attribute vec4 v_position;
  7. varying float coord_s;
  8. void main()
  9. {
  10. coord_s = v_position.w;
  11. gl_Position = projection_matrix * view_model_matrix * vec4(v_position.xyz, 1.0);
  12. }