From 29c6044c913e1ac66f328b3bc8bf78b5a969b3d7 Mon Sep 17 00:00:00 2001 From: madhawav Date: Thu, 8 Apr 2021 15:37:55 -0700 Subject: [PATCH] Option to disable anti aliasing --- pyrender/constants.py | 3 +++ pyrender/renderer.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pyrender/constants.py b/pyrender/constants.py index 8a5785b..e44bc2a 100644 --- a/pyrender/constants.py +++ b/pyrender/constants.py @@ -55,6 +55,9 @@ class RenderFlags(object): """Render the color buffer flat, with no lighting computations.""" SEG = 8192 + """Disable anti-aliasing""" + DISABLE_ANTI_ALIASING = 16384 + class TextAlign: """Text alignment options for captions. diff --git a/pyrender/renderer.py b/pyrender/renderer.py index f212907..cbcaf3a 100644 --- a/pyrender/renderer.py +++ b/pyrender/renderer.py @@ -335,7 +335,7 @@ def _forward_pass(self, scene, flags, seg_node_map=None): glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) - if not bool(flags & RenderFlags.SEG): + if not bool(flags & RenderFlags.SEG) and not bool(flags & RenderFlags.DISABLE_ANTI_ALIASING): glEnable(GL_MULTISAMPLE) else: glDisable(GL_MULTISAMPLE)