2020-02-03 10:52:39 -08:00
|
|
|
#version 330
|
|
|
|
|
2020-02-05 14:45:42 -08:00
|
|
|
in vec3 point;
|
2023-01-15 19:09:29 -08:00
|
|
|
in vec4 stroke_rgba;
|
2020-02-03 10:52:39 -08:00
|
|
|
in float stroke_width;
|
2023-01-16 21:46:43 -08:00
|
|
|
in vec3 joint_normal;
|
2023-01-15 19:09:29 -08:00
|
|
|
in float joint_angle;
|
2020-02-03 10:52:39 -08:00
|
|
|
|
2020-06-01 16:21:18 -07:00
|
|
|
// Bezier control point
|
2023-01-08 21:53:43 -05:00
|
|
|
out vec3 verts;
|
2020-02-03 10:52:39 -08:00
|
|
|
|
2023-01-08 20:29:31 -05:00
|
|
|
out float v_joint_angle;
|
2020-02-03 10:52:39 -08:00
|
|
|
out float v_stroke_width;
|
|
|
|
out vec4 v_color;
|
2023-01-12 15:56:12 -08:00
|
|
|
out float v_vert_index;
|
2020-02-03 10:52:39 -08:00
|
|
|
|
2020-06-09 12:34:00 -07:00
|
|
|
const float STROKE_WIDTH_CONVERSION = 0.01;
|
2020-02-16 10:53:16 -08:00
|
|
|
|
2023-01-16 21:46:43 -08:00
|
|
|
#INSERT get_gl_Position.glsl
|
|
|
|
|
2020-02-03 10:52:39 -08:00
|
|
|
void main(){
|
2023-01-16 21:46:43 -08:00
|
|
|
verts = position_point_into_frame(point);
|
2022-07-19 12:38:45 -07:00
|
|
|
v_stroke_width = STROKE_WIDTH_CONVERSION * stroke_width * frame_shape[1] / 8.0;
|
2023-01-08 20:29:31 -05:00
|
|
|
v_joint_angle = joint_angle;
|
2023-01-15 19:09:29 -08:00
|
|
|
v_color = stroke_rgba;
|
2023-01-12 15:56:12 -08:00
|
|
|
v_vert_index = gl_VertexID;
|
2020-02-03 10:52:39 -08:00
|
|
|
}
|