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;
|
2024-11-25 11:27:11 -07:00
|
|
|
uniform float scale_stroke_with_zoom;
|
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;
|
2024-08-21 11:59:48 -05:00
|
|
|
in float joint_angle;
|
|
|
|
in vec3 unit_normal;
|
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
|
|
|
|
|
|
|
out vec4 v_color;
|
2024-08-21 11:59:48 -05:00
|
|
|
out float v_stroke_width;
|
|
|
|
out float v_joint_angle;
|
|
|
|
out vec3 v_unit_normal;
|
2020-02-03 10:52:39 -08:00
|
|
|
|
2024-08-16 15:03:47 -05: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;
|
2024-08-21 11:59:48 -05:00
|
|
|
v_color = stroke_rgba;
|
2024-11-25 11:27:11 -07:00
|
|
|
v_stroke_width = STROKE_WIDTH_CONVERSION * stroke_width * mix(frame_scale, 1, scale_stroke_with_zoom);
|
2024-08-21 11:59:48 -05:00
|
|
|
v_joint_angle = joint_angle;
|
|
|
|
v_unit_normal = unit_normal;
|
2020-02-03 10:52:39 -08:00
|
|
|
}
|