Commit graph

47 commits

Author SHA1 Message Date
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
Grant Sanderson
05796654f4 Replace "bezier_degree" with "is_linear" 2023-01-10 08:54:02 -08:00
Grant Sanderson
2b90f0b244 Add condition for auto-miter joints 2023-01-09 20:30:49 -08:00
Grant Sanderson
480cc6759f Small cleanup 2023-01-09 19:54:21 -08:00
Grant Sanderson
f75df1e26e Clean up a few messes from previous commit 2023-01-09 18:51:41 -08:00
Grant Sanderson
c67ae08b62 Have stroke geometry shader pass to a coordinate system where the curve is some segment of y = x^2 2023-01-09 16:46:38 -08:00
Grant Sanderson
d87db65344 Add stand-in for better unit normal treatment 2023-01-09 12:02:50 -08:00
Grant Sanderson
ccf7a503c1 Add ANGLE_THRESHOLD constant 2023-01-09 10:52:12 -08:00
Grant Sanderson
ccbb5534fa Remove find_intersection 2023-01-09 10:52:02 -08:00
Grant Sanderson
5870274adb Delete unused functions 2023-01-09 00:07:46 -05:00
Grant Sanderson
47d0dca087 Check for null curve 2023-01-08 23:58:45 -05:00
Grant Sanderson
89d9e260eb Various cleanups for stroke shader 2023-01-08 23:33:39 -05:00
Grant Sanderson
ae2a253fb1 Just pass one bevel parameter rather than two 2023-01-08 21:56:38 -05:00
Grant Sanderson
0136cef1d9 Minor simplifications for stroke shader 2023-01-08 21:53:43 -05:00
Grant Sanderson
d5fdc75164 Remove the need to track previous and next joints in stroke shader 2023-01-08 20:29:31 -05:00
Grant Sanderson
8fc243e398 Make anti_alias_width a Mobject uniform, rather than a camera attribute 2022-12-28 18:52:05 -08:00
Grant Sanderson
795f6e2490 Remove unit_normal attribute 2022-12-27 19:12:00 -08:00
Grant Sanderson
40bf1fd6a9 Stop tracking unit_normal in data
Track orientation of each curve instead
2022-12-23 10:08:23 -07:00
Grant Sanderson
de7d9ce8c9 Don't let stroke width vary with zoom levels 2022-07-19 12:38:45 -07:00
Grant Sanderson
81c3ae3037 Have separate notions of gloss and reflectiveness 2021-11-08 21:46:09 -08:00
Samip Poudel
5a16e3a358 Converted 0 to 0.0 in sdf() and angle_between_vectors() 2021-02-03 17:22:28 +05:45
Grant Sanderson
59af903f14 Reorganize the interaction between CameraFrame and shader perspective transforms, along with some keyboard interactions for panning 2021-01-18 16:39:29 -08:00
Grant Sanderson
e98ebfe9e1 Rename add_light -> finalize_color and leave room for other color manipulations 2021-01-09 22:11:38 -08:00
Grant Sanderson
a429a146c7 Fix how stroke is scaled for perspective 2021-01-09 10:30:11 -08:00
Grant Sanderson
632c35daef Fix bugs in stroke shader for 3d scenes 2021-01-08 22:28:34 -08:00
Grant Sanderson
7b8677fd6c Push all mention of the #INSERT convention to a note in the insert file 2021-01-07 16:16:20 -08:00
Grant Sanderson
065df65cf1 Reorganize how shader files sit in the shaders folder 2021-01-05 23:14:16 -08:00