Keeps stroke width as a function of pixels, independent of zoom level

This commit is contained in:
Grant Sanderson 2024-08-21 16:12:56 -05:00
parent d870bb29de
commit bda894959b

View file

@ -23,8 +23,7 @@ const float STROKE_WIDTH_CONVERSION = 0.01;
void main(){ void main(){
verts = point; verts = point;
v_color = stroke_rgba; v_color = stroke_rgba;
// v_stroke_width = STROKE_WIDTH_CONVERSION * stroke_width * mix(frame_scale, 1, is_fixed_in_frame); v_stroke_width = STROKE_WIDTH_CONVERSION * stroke_width * mix(frame_scale, 1, is_fixed_in_frame);
v_stroke_width = STROKE_WIDTH_CONVERSION * stroke_width;
v_joint_angle = joint_angle; v_joint_angle = joint_angle;
v_unit_normal = unit_normal; v_unit_normal = unit_normal;
v_vert_index = gl_VertexID; v_vert_index = gl_VertexID;