From 7f4b287ac54fbd5c111a9be76f3928c6025f0014 Mon Sep 17 00:00:00 2001 From: MrDiver Date: Fri, 15 Sep 2023 00:38:39 +0200 Subject: [PATCH] some formatting and removing unused variables --- manim/renderer/opengl_renderer.py | 5 ++--- manim/renderer/shaders/quadratic_bezier_fill/frag.glsl | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/manim/renderer/opengl_renderer.py b/manim/renderer/opengl_renderer.py index 9a0637f994..ba6eafbecb 100644 --- a/manim/renderer/opengl_renderer.py +++ b/manim/renderer/opengl_renderer.py @@ -201,7 +201,7 @@ def __init__( self, pixel_width: int = config.pixel_width, pixel_height: int = config.pixel_height, - samples=0, + samples=4, background_color: c.ManimColor = color.BLACK, background_opacity: float = 1.0, background_image: str | None = None, @@ -268,6 +268,7 @@ def __init__( ] ) + # Preparing vmobject shader logger.debug("Initializing Shader Programs") self.vmobject_fill_program = load_shader_program_by_folder( @@ -433,8 +434,6 @@ def enable_depth(mob): np.array(range(len(sub.points))), ) - counter += 1 - def get_pixels(self) -> ImageType: raw = self.output_fbo.read(components=4, dtype="f1", clamp=True) # RGBA, floats buf = np.frombuffer(raw, dtype=np.uint8).reshape((1080, 1920, -1)) diff --git a/manim/renderer/shaders/quadratic_bezier_fill/frag.glsl b/manim/renderer/shaders/quadratic_bezier_fill/frag.glsl index 8dfd8fab00..e6defdef1a 100644 --- a/manim/renderer/shaders/quadratic_bezier_fill/frag.glsl +++ b/manim/renderer/shaders/quadratic_bezier_fill/frag.glsl @@ -53,7 +53,7 @@ void main() { { gl_FragDepth = gl_FragCoord.z - index / 1000.0; } - stencil_value.r = index; + stencil_value.rgb = vec3(index); stencil_value.a = 1.0; frag_color = color; if (fill_all == 1.0) return;