Anti-aliasing is a graphical technique for smoothing pixel-based images to reduce discrete edges.
These settings (both antialias for ray-tracing and antialias_shader for real-time antialiasing) can be changed using the menu :
Setting → Rendering → Antialias
or setting these settings:
# set real-time antialiasing on, using SMAA (off by default) set antialias_shader, 2 # set ray-tracing antialias level to 2 (1 by default) set antialias, 2
Antialiasing is enabled by default for ray-tracing. The antialias setting controls the level of antialiasing. Higher numbers take longer to ray trace but provide much smoother and better looking images (range: 0-4, 0 is off, 4 is a higher setting, better image quality. default: 1).
As of PyMOL 1.7.2, we now provide real-time rendering when shaders are available and your graphics card handle these shaders, using the antialias_shader setting:
There are differences between FXAA and SMAA, most notably that SMAA has 3-passes and FXAA has only 1-pass, depending on your graphics card, SMAA might perform slower. Also, currently we do these Anti-alias passes after everything in the scene is rendered (after the labels but before the indicators). FXAA degrades labels slightly worse than SMAA. In the next version of PyMOL, we will make sure these anti-alias passes happen before labels are rendered as well, so this will not be an issue.
| No Antialiasing|
(Good labels, bad edges)
| FXAA |
(Better edges, worse labels)
(Good edges, good labels)
There are subtle differences between these pictures, however, when you look closely, they are clearly different. Look at the pixels in “LEU”: the FXAA image has the label “bleeding” into other pixels, while the SMAA labels look much closer to the original without AA. In this case, the edges in SMAA seem notably better as well.
For most cases, you should use SMAA (i.e., antialias_shader=2), unless you are not using labels and are seeing a notable performance difference.