An implementation of Enhanced Subpixel Morphological Antialiasing (SMAA) written in C++
- CMake (>= 3.1)
- libpng (optional, needed for tests and example)
mkdir build
cd build
cmake path/to/source
make
sudo make install
The folloing two classes are provided. See header files and example (bin/smaa_png.cpp) for more details.
Pixel shaders similar to the original SMAA implementation:
smaa-cpp | original HLSL |
---|---|
SMAA::PixelShader::lumaEdgeDetection() | SMAALumaEdgeDetectionPS() |
SMAA::PixelShader::colorEdgeDetection() | SMAAColorEdgeDetectionPS() |
SMAA::PixelShader::depthEdgeDetection() | SMAADepthEdgeDetectionPS() |
SMAA::PixelShader::blendingWeightCalculation() | SMAABlendingWeightCalculationPS() |
SMAA::PixelShader::neighborhoodBlending() | SMAANeighborhoodBlendingPS() |
This is used for defining getPixel() member function as a callback.
Tested only on Linux.
MIT license.