There are some changes compared to the original smallpt implementation:
- Uses single-precision floating point numbers. To avoid light leaking artifacts, the light source has a much smaller radius.
- No recursion.
- No ray splitting in first bounce for glass BRDF.
- Outputs HDR image in pfm format.
Visual Studio 2017
mkdir build cd build cmake -DISPC=/path/to/ispc.exe -G"Visual Studio 15 2017 Win64" ..
Load the solution in Visual Studio and press the Build button.
Use the appropriate CMake generator for your system. It may be necessary to change the task system used by ispc in the CMakeLists.txt file. By default it is set to Microsoft's Concurrency Runtime (
smallpt.exe [width] [height] [numSamples] [mode] [multithreading] [bounces] [russianRoulette]
height: Size of image in pixels.
numSamples: Number of samples per pixel, divided by 4 (i.e., 8 gives 32 samples).
0 for ispc,
1 for regular C compiler.
0 for single-threading,
1 for multi-threading (ispc only).
bounces: Number of bounces before paths are terminated with russian roulette.
0 disables russian roulette,
1 enables it.