Commit graph

87 commits

Author SHA1 Message Date
Grant Sanderson
099aaaee43 Increase polyline factor 2024-08-07 14:46:26 -05:00
Grant Sanderson
70862a068f Don't buff out stroke width by antialias width 2024-08-07 14:46:17 -05:00
Grant Sanderson
f677a02036 Allow for manually setting miter or bevel joints 2024-08-07 14:45:55 -05:00
Grant Sanderson
61a2b4d0da Improve flat stroke for sharp corners with a smooth transition to miter joints 2024-08-07 10:34:47 -05:00
Grant Sanderson
edb438e5e2 Further clean up to stroke shader 2024-08-06 15:45:21 -05:00
Grant Sanderson
ec88673e92 Fix kink issue in flat stroke 2024-08-06 10:41:31 -05:00
Grant Sanderson
a5926195ee Clean up stroke shader 2024-08-05 15:01:02 -05:00
Grant Sanderson
557819ad03 Remove pre-computation of curve points and joint products 2024-08-05 14:25:15 -05:00
Grant Sanderson
f363eaa2fd Add stand in for a ribboning effect 2024-08-05 13:37:34 -05:00
Grant Sanderson
c61c18486c Don't bevel corners on inner joints of quadratic bezier curves 2024-08-05 13:37:17 -05:00
Grant Sanderson
26249c34bb Have non-flat stroke operate based on projecting tangents 2024-08-05 09:15:06 -05:00
Grant Sanderson
b3bbc31ea9 Small clean up to stroke shaders 2024-08-03 08:12:00 -05:00
Grant Sanderson
aea747b6d3 Final refinements on polyline stroke implementations 2024-08-01 07:41:32 -05:00
Grant Sanderson
361817b506 Pass fewer values to frag shader 2024-08-01 07:17:26 -05:00
Grant Sanderson
a3469c236e Simpler compute_subdivisions 2024-08-01 06:32:04 -05:00
Grant Sanderson
c6a6503544 Cleaning up first pass implementation 2024-07-31 16:27:37 -04:00
Grant Sanderson
3ea8393e9a First pass at a polyline implementation for stroke 2024-07-31 15:51:06 -04:00
Grant Sanderson
a105216a47 Small clean up 2024-07-31 15:31:26 +02:00
Grant Sanderson
7c087838a3 Change backstroke defaults in OpeningScene 2023-01-31 21:33:36 -08:00
Grant Sanderson
2cbad30f45 Change VMobject rendering mode to TRIANGLES
And set indices appropriately when reading in to the ShaderWrapper
2023-01-31 11:45:53 -08:00
Grant Sanderson
e950286fa4 Replace get_gl_Position -> emit_gl_Position 2023-01-30 18:43:28 -08:00
Grant Sanderson
1c432dd6dc Small refactor to stroke geom shader 2023-01-27 10:48:06 -08:00
Grant Sanderson
79039bde61 Fix Arrow 2023-01-26 23:42:03 -08:00
Grant Sanderson
4cb9c9c2fc Remove unnecessary normalize 2023-01-25 08:18:10 -08:00
Grant Sanderson
307487e087 Don't pre-normalize joint_products 2023-01-24 21:10:26 -08:00
Grant Sanderson
6e56c31d67 Use gl_InstanceID instead of hacking triangle_strip 2023-01-24 13:49:43 -08:00
Grant Sanderson
b1f0270316 Change threshold for bevel reduction 2023-01-24 12:05:25 -08:00
Grant Sanderson
03080a10a7 Small style tweaks 2023-01-23 15:05:10 -08:00
Grant Sanderson
0d66981ac7 Fix issue with variable stroke width 2023-01-20 21:38:28 -08:00
Grant Sanderson
6c262f63b1 Reduce is_linear threshold 2023-01-20 10:10:39 -08:00
Grant Sanderson
909e515a2f Only compute xyz-to-uv matrix in non-linear case 2023-01-19 20:24:32 -08:00
Grant Sanderson
6c2544098b Store pixel_size instead of pixel_shape 2023-01-18 13:50:09 -08:00
Grant Sanderson
b667d89e9b Simplify get_gl_Position 2023-01-18 13:44:41 -08:00
Grant Sanderson
fa525b494c Increase threshold for bevel tweaking 2023-01-18 13:07:37 -08:00
Grant Sanderson
d39fea0d4d A few small fixes 2023-01-18 12:52:05 -08:00
Grant Sanderson
72e5bde274 Rename xy-to-uv -> xyz-to-uv 2023-01-18 10:58:25 -08:00
Grant Sanderson
0b72bc5d08 Fix joint normal issue 2023-01-18 10:04:05 -08:00
Grant Sanderson
9ed8dd5439 Clean up 2023-01-17 17:39:32 -08:00
Grant Sanderson
b7831ef3f1 Go back to computing xyz-to-uv before repositioning 2023-01-17 17:27:20 -08:00
Grant Sanderson
c2587de691 Apply xyz_to_uv to pre-positioned points 2023-01-17 17:22:00 -08:00
Grant Sanderson
870e88f8c9 First attempt at finding uv coords from 3d space instead of 2d 2023-01-17 15:46:09 -08:00
Grant Sanderson
7fe84d9263 Don't recompute cross(v01, v12) 2023-01-17 13:18:32 -08:00
Grant Sanderson
1b3bc7a27c For linearity, check cosine of angle instead of angle 2023-01-17 13:16:58 -08:00
Grant Sanderson
abbe131e8d Track full cross product and dot product of tangent vectors at joints
And alter the convention of what flat_stroke means to be more sensible in 3d
2023-01-17 11:36:47 -08:00
Grant Sanderson
8d277af47c Go back the convention of positioning stroke vertices in space before geom shader 2023-01-16 21:46:43 -08:00
Grant Sanderson
c3cd64f68c Package reflectiveness, gloss and shadow into a single uniform "shading" 2023-01-16 19:33:57 -08:00
Grant Sanderson
c8238f6b39 Consolidate lighting uniforms 2023-01-14 07:57:47 -08:00
Grant Sanderson
d19b244ee1 Move uniform pixel_shape declaration outside of get_gl_Position 2023-01-13 22:11:13 -08:00
Grant Sanderson
a004c88e02 Consolidate functions associated with computing gl_Position 2023-01-13 22:07:28 -08:00
Grant Sanderson
e534206eb6 Small style change to get_xy_to_uv 2023-01-13 17:37:08 -08:00