Commit graph

76 commits

Author SHA1 Message Date
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
23b4e3e03b Use cubic formula in stroke frag for large stroke width case 2023-01-20 13:22:18 -08:00
Grant Sanderson
6c262f63b1 Reduce is_linear threshold 2023-01-20 10:10:39 -08:00
Grant Sanderson
b7ea24f9ea Tweak stroke frag 2023-01-20 10:09:58 -08:00
Grant Sanderson
debc68a3b4 Just moving some lines around 2023-01-19 20:24:59 -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
13c41be17f Small clean up 2023-01-18 13:07:18 -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
6f9f83fb1b Unify shader_dtype and data_dtype 2023-01-15 19:09:29 -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
Grant Sanderson
923066db2b Minor style changes to stroke geom shader 2023-01-12 19:54:32 -08:00
Grant Sanderson
dcdf74a715 Clean up stroke geometry shader to better function in 3d 2023-01-12 19:24:42 -08:00
Grant Sanderson
a07701e295 Use triangle strip for stroke shader 2023-01-12 15:56:12 -08:00
Grant Sanderson
24afb2a24f Fix angle_between 2023-01-12 14:43:52 -08:00
Grant Sanderson
e676bd957b Do inner joint angle computation in geom shader 2023-01-12 13:08:35 -08:00
Grant Sanderson
04fd50491e More consistent corners computation for stroke geom shader 2023-01-12 10:14:14 -08:00
Grant Sanderson
131e1c2eeb Have corners emitted by stroke geom shader better line up with bezier control points
This is helpful for, say, setting variable stroke width
2023-01-11 21:30:12 -08:00
Grant Sanderson
5a56a2a5ec Remove bad solution to bevel issue 2023-01-11 20:28:00 -08:00
Grant Sanderson
c4e1db7f9d Don't draw paths where the handle equals the first anchor 2023-01-11 14:18:45 -08:00
Grant Sanderson
e189df81b1 Change default endpoint angle to be 0 2023-01-10 15:32:05 -08:00
Grant Sanderson
0c3367f27b First-pass fix for joints in 3d 2023-01-10 15:17:08 -08:00
Grant Sanderson
7212a98d65 Small clean up 2023-01-10 12:59:10 -08:00
Grant Sanderson
802bd58aa7 Small cleanup 2023-01-10 12:26:16 -08:00
Grant Sanderson
6ec3d9f4a5 Add 'no_joint' to joint types 2023-01-10 11:06:41 -08:00
Grant Sanderson
8175c2d408 Rename quadratic_bezier_geometry_functions to get_xy_to_uv 2023-01-10 09:53:17 -08:00
Grant Sanderson
70113d5a48 Tiny cleanup 2023-01-10 08:58:08 -08:00