2022-03-24 13:45:59 +00:00
|
|
|
#version 150
|
|
|
|
|
|
|
|
// see as reference: https://github.com/mhalber/Lines/blob/master/geometry_shader_lines.h
|
2022-03-25 13:33:11 +00:00
|
|
|
// https://stackoverflow.com/questions/52928678/dashed-line-in-opengl3
|
2022-03-24 13:45:59 +00:00
|
|
|
|
|
|
|
uniform mat4 view_model_matrix;
|
|
|
|
uniform mat4 projection_matrix;
|
|
|
|
|
2022-03-25 13:33:11 +00:00
|
|
|
// v_position.w = coordinate along the line
|
|
|
|
in vec4 v_position;
|
|
|
|
|
|
|
|
out float coord_s;
|
2022-03-24 13:45:59 +00:00
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2022-03-25 13:33:11 +00:00
|
|
|
coord_s = v_position.w;
|
|
|
|
gl_Position = projection_matrix * view_model_matrix * vec4(v_position.xyz, 1.0);
|
2022-03-24 13:45:59 +00:00
|
|
|
}
|