2020-02-03 10:52:39 -08:00
|
|
|
#version 330
|
|
|
|
|
2020-02-05 14:45:42 -08:00
|
|
|
in vec3 point;
|
|
|
|
in vec3 prev_point;
|
|
|
|
in vec3 next_point;
|
2020-02-03 10:52:39 -08:00
|
|
|
|
|
|
|
in float stroke_width;
|
|
|
|
in vec4 color;
|
|
|
|
in float joint_type;
|
|
|
|
|
2020-02-16 10:53:16 -08:00
|
|
|
out vec3 bp; // Bezier control point
|
|
|
|
out vec3 prev_bp;
|
|
|
|
out vec3 next_bp;
|
2020-02-03 10:52:39 -08:00
|
|
|
|
|
|
|
out float v_stroke_width;
|
|
|
|
out vec4 v_color;
|
|
|
|
out float v_joint_type;
|
|
|
|
|
2020-02-16 10:53:16 -08:00
|
|
|
// TODO, this should maybe depend on scale
|
2020-02-03 10:52:39 -08:00
|
|
|
const float STROKE_WIDTH_CONVERSION = 0.01;
|
|
|
|
|
2020-02-16 10:53:16 -08:00
|
|
|
|
|
|
|
#INSERT rotate_point_for_frame.glsl
|
|
|
|
|
|
|
|
|
2020-02-03 10:52:39 -08:00
|
|
|
void main(){
|
|
|
|
v_stroke_width = STROKE_WIDTH_CONVERSION * stroke_width;
|
|
|
|
v_color = color;
|
|
|
|
v_joint_type = joint_type;
|
|
|
|
|
2020-02-16 10:53:16 -08:00
|
|
|
bp = rotate_point_for_frame(point);
|
|
|
|
prev_bp = rotate_point_for_frame(prev_point);
|
|
|
|
next_bp = rotate_point_for_frame(next_point);
|
2020-02-03 10:52:39 -08:00
|
|
|
}
|