Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Option to disable anti aliasing #175

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 not bool(flags & RenderFlags.DISABLE_ANTI_ALIASING):
glEnable(GL_MULTISAMPLE)
else:
glDisable(GL_MULTISAMPLE)
Expand Down