3D raytracer developed using the OpenCL API for the module Architectures and Performance at Abertay Dundee during my second year. It features:
The focus of the module was on performance evaluation and how a multiprocessor hardware architecture,
and therefore parallel programming, can be used to improve the performance of a program with respect to its
single-processor oriented implementation. Therefore I decided to explore the world of GPGPU and the concept
of heterogeneous architectures as it presents a great example of parallelisation of a task.
Rendering a 3D scene using raytracing involves calculating the colour of each pixel of the picture to be rendered independently from the colour of the other ones. It follows that by assigning a work unit per pixel, the entire workload can be executed simultaneously, therefore producing a frame much quicker than if there were one or a few more work units (as on a CPU). The results obtained with this raytracer show that, although it has not yet been optimised and it is at its first iteration, it is possible to render a frame in 20ms.
There is an executable version which allows certain parameters to be set: More info can be found in the reports.
Special thanks to my classmate Stefano Musumeci, to my lecturer Adam Sampson and to my friend and mentor Steven Tovey for their awesomeness and for their help.
Finally, many thanks also to Don Cross for his website which I used to write the code of my raytracer by adapting and modifying his code, and to Timea Tabori.