Skip to content

Commit

Permalink
Option to disable anti aliasing
Browse files Browse the repository at this point in the history
  • Loading branch information
madhawav committed Apr 8, 2021
1 parent dd6dbd8 commit 25c0f7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pyrender/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pyrender/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 bool(flags & RenderFlags.DISABLE_ANTI_ALIASING):
glEnable(GL_MULTISAMPLE)
else:
glDisable(GL_MULTISAMPLE)
Expand Down

0 comments on commit 25c0f7d

Please # to comment.