An open API service indexing awesome lists of open source software.

https://github.com/florianvazelle/raytracing

A ray tracing library written in C++, with an optional raytracer
https://github.com/florianvazelle/raytracing

parallel raytracer raytracing

Last synced: 5 months ago
JSON representation

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

Awesome Lists containing this project

README

          

![Travis](https://img.shields.io/travis/florianvazelle/raytracing?style=flat&logo=travis)
![Platform](https://img.shields.io/badge/platform-windows%20%7C%20linux-blue)
[![License](https://img.shields.io/badge/license-Unlicense-blue.svg)](https://github.com/florianvazelle/raytracing/blob/master/LICENSE)
[![Lines of Code](https://tokei.rs/b1/github/florianvazelle/raytracing?category=code)](https://tokei.rs)

# 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

```bash
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.

```bash
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.

```bash
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](https://cmake.org) for build system creation (>= 3.0)