GitHub - biroeniko/raytracer: My very first ray tracer implementation.
source link: https://github.com/biroeniko/raytracer
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
raytracer
My implementation of Peter Shirley's Ray Tracing in one weekend.
Some versions are available through different branches:
Details:
This code follows the steps of Peter Shirley's mini book series.
Features implemented so far are:
- Cmake support
- Basic implementation of all features included in Peter Shirley's Ray Tracing in one weekend
- Multithreaded implementation with OpenMP
- Supported output formats: PNG with STB image library and PPM
- SDL2 for real-time display support + keyboard movement support
- PCG random number generator (the minimal C implementation)
- CUDA support
Features to be implemented:
- Other two books
- Accelerated versions
- ispc
- use denoising
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Prerequisites
The basic requirements for building the executable are:
- CMake 2.8+
- a C++ compiler
- make
- SDL2
Other requirements:
- CUDA support
Installation on Ubuntu
sudo apt-get install build-essentials cmake
sudo apt-get install libsdl2-dev
Installing
This program have been tested on Ubuntu 16.04 but should work under any systems that fulfills the aforementioned requirements.
Installation on Ubuntu
If you succesfully cloned the source files and you are currently in the project directory, you can generate the Makefile using the following command:
mkdir build
cd build/
cmake ..
Now you can build the binary by running:
make
Now, you should see the executable in the build folder. Examples for the final images are:
Some screenshots along the way of developing:
Built With
- SDL2 - used for display
- OpenMP - used for creating multiple threads for the tasks (pixel color calculation)
- CUDA - used for acceleration
Authors
- Biró Enikő - BiroEniko
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK