From 4a6e6ca64603a4ddcf0e5c82202f9fb762868c41 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Fri, 16 Aug 2024 12:04:27 -0500 Subject: [PATCH] Double the size of the fill canvas, to effectively do msaa --- manimlib/utils/shaders.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manimlib/utils/shaders.py b/manimlib/utils/shaders.py index 2aae129a..d21c812c 100644 --- a/manimlib/utils/shaders.py +++ b/manimlib/utils/shaders.py @@ -148,7 +148,8 @@ def get_fill_canvas(ctx: moderngl.Context) -> Tuple[Framebuffer, VertexArray]: along with the rgb value which is meant to be discarded. """ cam_config = get_configuration(parse_cli())['camera_config'] - size = (cam_config['pixel_width'], cam_config['pixel_height']) + # Double the size so as to effectively to 4x multi-sample antialiasing + size = (2 * cam_config['pixel_width'], 2 * cam_config['pixel_height']) # Important to make sure dtype is floating point (not fixed point) # so that alpha values can be negative and are not clipped