2020-02-03 10:52:39 -08:00
|
|
|
#version 330
|
|
|
|
|
2021-01-18 16:39:29 -08:00
|
|
|
#INSERT camera_uniform_declarations.glsl
|
2020-06-01 16:21:18 -07:00
|
|
|
|
2020-02-05 14:45:42 -08:00
|
|
|
in vec3 point;
|
|
|
|
in vec3 prev_point;
|
|
|
|
in vec3 next_point;
|
2020-06-04 11:29:36 -07:00
|
|
|
in vec3 unit_normal;
|
2020-02-03 10:52:39 -08:00
|
|
|
|
|
|
|
in float stroke_width;
|
|
|
|
in vec4 color;
|
|
|
|
|
2020-06-01 16:21:18 -07:00
|
|
|
// Bezier control point
|
|
|
|
out vec3 bp;
|
2020-02-16 10:53:16 -08:00
|
|
|
out vec3 prev_bp;
|
|
|
|
out vec3 next_bp;
|
2020-06-04 11:29:36 -07:00
|
|
|
out vec3 v_global_unit_normal;
|
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-06-01 16:21:18 -07:00
|
|
|
#INSERT position_point_into_frame.glsl
|
2020-02-16 10:53:16 -08:00
|
|
|
|
2020-02-03 10:52:39 -08:00
|
|
|
void main(){
|
2020-06-01 16:21:18 -07:00
|
|
|
bp = position_point_into_frame(point);
|
|
|
|
prev_bp = position_point_into_frame(prev_point);
|
|
|
|
next_bp = position_point_into_frame(next_point);
|
2021-01-18 16:39:29 -08:00
|
|
|
v_global_unit_normal = rotate_point_into_frame(unit_normal);
|
2020-06-01 16:21:18 -07:00
|
|
|
|
2020-02-03 10:52:39 -08:00
|
|
|
v_stroke_width = STROKE_WIDTH_CONVERSION * stroke_width;
|
|
|
|
v_color = color;
|
|
|
|
}
|