Commit graph

259 commits

Author SHA1 Message Date
Grant Sanderson
fbce0b132c Temporary band-aide for degenerate normal vector calculations
This solution is a bit too specific to the case of spheres.
2024-11-25 12:39:32 -07:00
Grant Sanderson
dd51b696e5 Only apply non-flat-stroke correction in non-zero joint angle vertices 2024-11-25 12:35:32 -07:00
Grant Sanderson
9cd6a87ff8 Make sure VMobject uniform flat_stroke matches the use inside the quadratic_bezier/stroke/geom.glsl code 2024-11-25 12:28:31 -07:00
Grant Sanderson
54c8a9014b Add scale_stroke_with_zoom option to VMobject 2024-11-25 11:27:11 -07:00
Grant Sanderson
aaa28a2712 Discard transparent parts of textured surfaces 2024-10-17 12:31:53 -05:00
Grant Sanderson
09e9e65ba4 Merge branch 'master' of github.com:3b1b/manim into video-work 2024-10-01 13:29:42 -05:00
Grant Sanderson
f0bf50eb7f Remove use of gl_VertexID 2024-09-28 09:54:28 -05:00
Grant Sanderson
95fca885c9 Push clip plane functionality up to all Mobjects 2024-09-17 17:20:19 -05:00
Grant Sanderson
6d23df0497 Clean up changes associated with fixing aspect ratio issue 2024-09-06 12:50:19 -05:00
Grant Sanderson
fcc5dc00f9 Treat objects fixed in frame as having flat stroke 2024-08-23 14:17:26 -05:00
Grant Sanderson
5d6a1f30c4 Count joints near 180 degrees as straight 2024-08-23 13:55:10 -05:00
Grant Sanderson
ada66ee8fb Remove stray comment 2024-08-22 15:31:10 -05:00
Grant Sanderson
9a7bfdd1c9 For Surface, calculate normals with neighboring points 2024-08-22 15:21:40 -05:00
Grant Sanderson
bda894959b Keeps stroke width as a function of pixels, independent of zoom level 2024-08-21 16:12:56 -05:00
Grant Sanderson
d870bb29de Fix the non-flat stroke edge case for tangents near line of sight 2024-08-21 16:12:13 -05:00
Grant Sanderson
9a5386b022 Instead of passing in joint_products to stroke shader, just track joint_angles and pass in global unit normal 2024-08-21 11:59:48 -05:00
Grant Sanderson
dfc5f152dd Have border width pre-multiply by alpha, and don't use a separate texture for that border width 2024-08-20 22:03:45 -05:00
Grant Sanderson
82582d08bd Fewer parameters for stroke frag shader 2024-08-20 13:32:52 -05:00
Grant Sanderson
0a313eb119 Reorganize quadratic bezier shader files 2024-08-20 12:58:34 -05:00
Grant Sanderson
5eb5a11499 Don't have absolute stroke width change with frame size (at least temporarily) 2024-08-20 12:36:28 -05:00
Grant Sanderson
0b2c59ac6b More explicitly unpack v_base_normal 2024-08-19 21:45:26 -05:00
Grant Sanderson
c064b11e2a Interleave base_point and unit_normal in the same array 2024-08-19 16:50:49 -05:00
Grant Sanderson
195264f079 Stop pretending to support non-winding fill in the fill shader.
Possibly, if we want to reintroduce it later on, it should have its own dedicated shader, and maybe a distinct Mobject type too
2024-08-19 14:37:11 -05:00
Grant Sanderson
39bcead679 Clean up 2024-08-19 14:22:10 -05:00
Grant Sanderson
3b5d63d2fa Add depth shader to handle winding fill depth test. 2024-08-19 14:09:07 -05:00
Grant Sanderson
24b160f9f9 Update VMobject shader wrapper
Use a combined VBO
Render with TRIANGLE_STRIP, and ignore every other
2024-08-19 08:05:32 -05:00
Grant Sanderson
0267740bde Change STROKE_WIDTH_CONVERSION width back to older value 2024-08-16 15:03:47 -05:00
Grant Sanderson
d8edccdab4 Fix zero stroke width issue 2024-08-16 14:59:18 -05:00
Grant Sanderson
04347e7876 Fix thin stroke issue for low resolutions 2024-08-15 17:11:02 -05:00
Grant Sanderson
a4858918dd Small reformatting 2024-08-08 13:59:50 -07:00
Grant Sanderson
31b6affabb Push up pointwise styling update 2024-08-08 13:56:16 -07:00
Grant Sanderson
cff3bdf8d4 Remove unnecessary flat stroke option 2024-08-08 13:55:48 -07:00
Grant Sanderson
9f54b85c4e Change miter threshold to global constant 2024-08-08 13:55:25 -07:00
Grant Sanderson
c345d76de0 Patch for glitches associated with non-flat stroke when tangency direction lines up with camera view 2024-08-08 11:36:28 -05:00
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
0a43a3ff9a Remove unnecessary stroke vert input 2024-08-07 14:10:50 -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