2020-02-03 10:52:39 -08:00
|
|
|
#version 330
|
|
|
|
|
2023-01-30 15:10:41 -08:00
|
|
|
uniform float frame_scale;
|
|
|
|
uniform float is_fixed_in_frame;
|
2023-01-17 11:36:47 -08:00
|
|
|
|
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-17 11:36:47 -08:00
|
|
|
in vec4 joint_product;
|
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-17 11:36:47 -08:00
|
|
|
out vec4 v_joint_product;
|
2020-02-03 10:52:39 -08:00
|
|
|
out float v_stroke_width;
|
|
|
|
out vec4 v_color;
|
|
|
|
|
2020-06-09 12:34:00 -07:00
|
|
|
const float STROKE_WIDTH_CONVERSION = 0.01;
|
2020-02-16 10:53:16 -08:00
|
|
|
|
2020-02-03 10:52:39 -08:00
|
|
|
void main(){
|
2023-01-17 11:36:47 -08:00
|
|
|
verts = point;
|
2023-01-30 15:10:41 -08:00
|
|
|
v_stroke_width = STROKE_WIDTH_CONVERSION * stroke_width;
|
|
|
|
if(!bool(is_fixed_in_frame)){
|
|
|
|
v_stroke_width *= frame_scale;
|
|
|
|
}
|
2023-01-17 11:36:47 -08:00
|
|
|
v_joint_product = joint_product;
|
2023-01-15 19:09:29 -08:00
|
|
|
v_color = stroke_rgba;
|
2020-02-03 10:52:39 -08:00
|
|
|
}
|