This is an implementation of Enhanced Subpixel Morphological Antialiasing (SMAA)
The algorithm was proposed by:
Jorge Jimenez, Jose I. Echevarria, Tiago Sousa, Diego Gutierrez
Homepage URL:
http://www.iryoku.com/smaa/
This node provides only SMAA 1x mode, so the operation will be done with no spatial multisampling nor temporal supersampling.
Here is a comparison between existing antialiasing (Scale3x, imported from GIMP) and the Anti-Aliasing Node (SMAA 1x):
SMAA 1x produces much higher quality results than Scale3x.
The existing AA operation seems to be used only for binary images by some other nodes. Using SMAA for binary images needs no important parameter such as "threshold", so we perhaps can switch the operation to SMAA, though that changes existing behavior.
Currently, the node has 3 options:
- threshold
- contrast limit
- corner rounding
Please refer to devtalk thread for discussion about interface: https://devtalk.blender.org/t/compositor-anti-aliasing-node-d2411/17570
Example: Using Anti-Aliasing Node as an alternative of OLM smoother that is widely used in Japanese animation studios:
Notes:
- The program code assumes the screen coordinates are DirectX style that the vertical direction is upside-down, so "top" and "bottom" actually represent bottom and top, respectively
- smaa_areatex.cpp is a stand-alone software I [Shinsuke Irie] wrote for another project, so its copyright is still owned by me and under MIT-style license, see https://github.com/iRi-E/smaa-cpp
- Unfortunately, this patch doesn't include OpenCL support (I'm not familiar with it...), though SMAA is not so slow
Tested on macOS 11.2.1
Test cases (should be in /Users/habibgahbiche/blender-git/lib/tests/compositor/filter/):



