This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// smallgdpt: a simple implementation of gradient domain path tracing | |
// https://mediatech.aalto.fi/publications/graphics/GPT/ | |
// adapted from smallpt by Kevin Beason http://www.kevinbeason.com/smallpt/ | |
// and a screened poisson solver by Pravin Bhat http://grail.cs.washington.edu/projects/screenedPoissonEq/ | |
// to build, type: g++ -o smallgdpt -fopenmp -O3 smallgdpt.cpp -L/usr/local/lib -lm -lfftw3 | |
// you will need fftw3 http://www.fftw.org/ to compile | |
// usage: ./smallgdpt [number of samples per pixel] | |
#include <fftw3.h> | |
#include <math.h> | |
#include <stdlib.h> |