All Projects → 64 → Cmake Raytracer

64 / Cmake Raytracer

Licence: mit
Ray tracer written in pure CMake

Labels

Projects that are alternatives of or similar to Cmake Raytracer

Phoenix
A multi-system emulator and library manager designed to be both powerful and easy to use.
Stars: ✭ 367 (-17.34%)
Mutual labels:  cmake
Mumble
Mumble is an open-source, low-latency, high quality voice chat software.
Stars: ✭ 4,418 (+895.05%)
Mutual labels:  cmake
Rules foreign cc
Build rules for interfacing with "foreign" (non-Bazel) build systems (CMake, configure-make, GNU Make, boost, ninja)
Stars: ✭ 418 (-5.86%)
Mutual labels:  cmake
Cget
C++ package retrieval
Stars: ✭ 370 (-16.67%)
Mutual labels:  cmake
Cmakeconverter
This project aims to facilitate the conversion of Visual Studio to CMake projects.
Stars: ✭ 387 (-12.84%)
Mutual labels:  cmake
Cnl
A Compositional Numeric Library for C++
Stars: ✭ 397 (-10.59%)
Mutual labels:  cmake
Cmakepp
An Enhancement Suite for the CMake Build System
Stars: ✭ 365 (-17.79%)
Mutual labels:  cmake
Cgold
🐋 The Hitchhiker’s Guide to the CMake
Stars: ✭ 428 (-3.6%)
Mutual labels:  cmake
Downloadproject
CMake module for downloading an external project's source at configure time
Stars: ✭ 388 (-12.61%)
Mutual labels:  cmake
Innoextract
A tool to unpack installers created by Inno Setup
Stars: ✭ 407 (-8.33%)
Mutual labels:  cmake
Ark
ARK is a lightweight, agility, elastic, distributed plugin framework written in C++,make it easier and faster to create your own application service.
Stars: ✭ 370 (-16.67%)
Mutual labels:  cmake
Cmake Conan
CMake wrapper for conan C and C++ package manager
Stars: ✭ 374 (-15.77%)
Mutual labels:  cmake
Opencv Mingw Build
👀 MinGW 32bit and 64bit version of OpenCV compiled on Windows. Including OpenCV 3.3.1, 3.4.1, 3.4.1-x64, 3.4.5, 3.4.6, 3.4.7, 3.4.8-x64, 3.4.9, 4.0.0-alpha-x64, 4.0.0-rc-x64, 4.0.1-x64, 4.1.0, 4.1.0-x64, 4.1.1-x64, 4.5.0-with-contrib
Stars: ✭ 401 (-9.68%)
Mutual labels:  cmake
Cmake Templates
Some CMake Templates (examples). Qt, Boost, OpenCV, C++11, etc 一些栗子
Stars: ✭ 368 (-17.12%)
Mutual labels:  cmake
Tensorflow Cmake
TensorFlow examples in C, C++, Go and Python without bazel but with cmake and FindTensorFlow.cmake
Stars: ✭ 418 (-5.86%)
Mutual labels:  cmake
Units
A compile-time enabled Modern C++ library that provides compile-time dimensional analysis and unit/quantity manipulation.
Stars: ✭ 365 (-17.79%)
Mutual labels:  cmake
Kicad Packages3d
Official KiCad 3D model libraries for rendering and MCAD integration
Stars: ✭ 392 (-11.71%)
Mutual labels:  cmake
Cpp Reflection
C++ Reflection Parser / Runtime Skeleton
Stars: ✭ 440 (-0.9%)
Mutual labels:  cmake
Uikit Cross Platform
Cross-platform Swift implementation of UIKit, mostly for Android
Stars: ✭ 421 (-5.18%)
Mutual labels:  cmake
Ros 21 tutorials
《古月 · ROS入门21讲》课件&源码
Stars: ✭ 405 (-8.78%)
Mutual labels:  cmake

CMake Ray Tracer

A simple ray tracer written in pure CMake. Inspired by raytracer.hpp. More information can be found at my blog.

image

Usage

The ray tracer writes its output to stderr, so you can use it with:

cmake . -Dimage_width=64 -Dimage_height=64 -Dnum_procs=4 2> image.ppm

Which writes the output to image.ppm. Then use an image viewer capable of opening PPM files (or this) to view.

num_procs controls the number of worker processes spawned. It is recommended to set this to a value no greater than the number of cores in your CPU, for maximum performance.

For now, to keep the code simple, you are required to keep image_width, image_height and num_procs as powers of 2, otherwise the image may not be fully formed. If not specified, these arguments default to the values shown above.

Performance

Using cmake 3.19.2 on Linux 5.4 on a i5-10210U (4 cores, 8 threads), running this command:

for X in 1 2 4 8 16 32 64 128 256 512 ; do echo SIZE $X ; time cmake . -Dimage_width=$X -Dimage_height=$X -Dnum_procs=8 2> image_size_${X}.ppm  ; done

Figures reported by time command below (reformatted). As usual, the "real" time is the wall clock time. The others are summed on all processors.

size real user sys
1 0,054s 0,130s 0,051s
2 0,035s 0,098s 0,041s
4 0,077s 0,274s 0,018s
8 0,106s 0,460s 0,023s
16 0,367s 1,871s 0,059s
32 1,296s 7,617s 0,132s
64 5,175s 29,455s 0,356s
128 21,093s 2m06,299s 1,566s
256 1m33,395s 9m21,875s 5,999s
512 7m23,094s 45m36,327s 32,588s

Contributing

All contributions (issue, PRs) are welcome. This project is licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].