dashed_thick_lines.vs 469 B

123456789101112131415161718
  1. #version 150
  2. // see as reference: https://github.com/mhalber/Lines/blob/master/geometry_shader_lines.h
  3. // https://stackoverflow.com/questions/52928678/dashed-line-in-opengl3
  4. uniform mat4 view_model_matrix;
  5. uniform mat4 projection_matrix;
  6. // v_position.w = coordinate along the line
  7. in vec4 v_position;
  8. out float coord_s;
  9. void main()
  10. {
  11. coord_s = v_position.w;
  12. gl_Position = projection_matrix * view_model_matrix * vec4(v_position.xyz, 1.0);
  13. }