florianvazelle / raytracing

A ray tracing library written in C++, with an optional raytracer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Travis Platform License Lines of Code

Raytracing

A CPU ray tracing library, written in C++, with a matrix representation of entities.
There are two technical parts:

  • Ray tracing with shadows, ambient, diffuse (Lambert), specular (Phong), reflections, refractions (Snell-Descartes) with Schlick-Fresnel approximation and simple ambient occlusion implementation.
  • C++ with super-sampling, gamma correction and multithreading image calculation.

Getting the code

git clone --recursive git@github.com:florianvazelle/raytracing.git

Quickstart

./setup.sh

Building

Build and run the standalone target

Use the following command to build and run the executable target.

cmake -Bbuild
cmake --build build
./build/bin/compute --help  # or ./build/bin/raytracer

Build and run test suite

Use the following commands from the project's root directory to run the test suite.

cmake -Bbuild -DRTX_WITH_APP=OFF
cmake --build build
./build/bin/rtx_test

Project Structure

.
├── app                     # Raytracer implementation
│  ├── common
│  ├── compute              # Command-line tool
│  └── raytracer            # User interface app
├── assets
│  ├── samples
│  └── scenes
├── build                   # Compiled files
├── external                # Submodules
│  ├── cxxopts              # for cli options
│  ├── googletest           # for unit tests
│  ├── jsoncpp              # for scene parser
│  ├── nanogui              # for user interface
│  └── stb                  # for write PNG/JPG images
├── include
│  ├── parser
│  └── rtx                  # Raytracing library
├── source                  # Source files
│  └── parser                  
├── test                    # Automated tests
└── README.md

Roadmap

  • Real-time image rendering
  • Texture with normal/bump mapping
  • Depth of field
  • CUDA version
  • 3D models support

Requirements

  • C++11 compiler
    • gcc 5.0+
    • clang 5.0+
  • CMake for build system creation (>= 3.0)

About

A ray tracing library written in C++, with an optional raytracer

License:The Unlicense


Languages

Language:C++ 84.8%Language:CMake 14.5%Language:Shell 0.7%