buddhabrot-amp is a buddhabrot generator written in C++. It utilizes C++ AMP for the buddhabrot calculation, Direct3D11/DXGI for presentation to the screen & WIC for writing PNGs.
- Clone this repo
- Open solution using Visual Studio (build & tested with Visual Studio 2017)
- Build & run via Visual Studio
This class represents the core logic of generating the buddhabrot. It uses C++ AMP to find complex numbers which escape the Mandelbrot set & mark their path on a "canvas" up until they're considered to have escaped. The canvas that is used to record the paths of these escaping points make up the buddhabrot. We color a point on this canvas brighter/darker based on how many paths hit/did not hit this particular cell/point.
This class simply takes three canvases of equal dimensions for each color (red, green & blue) , puts the three color channels into one texture & finally samples this texture into a DXGI swapchain to be displayed on the screen.
This function is similar in it's logic to the BuddhabrotPresenter
in that it takes 3 canvases, combines them into one image & writes that image out to disk as a PNG file.