GithubHelp home page GithubHelp logo

spytheman / realist Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nsauzede/realist

0.0 2.0 0.0 3.18 MB

another C++ raytracer, based on CSDL (SDL1/2)

License: GNU General Public License v3.0

C++ 26.94% Makefile 0.63% POV-Ray SDL 0.44% Python 0.20% Go 9.30% C 31.95% Rust 12.47% V 9.01% Odin 9.03% Zig 0.03%

realist's Introduction

rtiow

This is my implementation of the excellent RTIOW ray tracing book in C, C++, V, Odin, Rust and Go

C RTIOW screenshot

C++ RTTNW screenshot

Check out RTIOW Readme

realist

Simple, naive, C++ ray-tracer

rayXX

Simple ray-tracer benchmark to compare between C, C++, Vlang and golang.

To run the benchmark :

$ make clobber bench BENCH_SIZE=10000
gcc -Wall -Werror -Wextra -g -pipe -std=c99 -O3  -pipe  rayc.c  -lm -o rayc
g++ -Wall -Werror -Wextra -g -pipe -std=c++11 -O3 -I.  -pipe  raycpp.cpp  -lm -o raycpp
cd ray_v ; ../v/v  -o ../rayv_v.c . ; cd ..
gcc -Wall -Werror -Wextra -g -pipe -std=c99 -O3  -pipe rayv_v.c -lm -o rayv -w
GOPATH=`pwd`/ray_go go build -o raygo ray_go/raygo.go
/usr/bin/time ./rayc 10000 10000 rayc.ppm && md5sum rayc.ppm
7.67user 0.20system 0:07.88elapsed 99%CPU (0avgtext+0avgdata 294688maxresident)k
0inputs+585944outputs (0major+764minor)pagefaults 0swaps
0ae8911109ff4a32f471bd704829a44c  rayc.ppm
/usr/bin/time ./rayv 10000 10000 rayv.ppm && md5sum rayv.ppm
11.37user 0.21system 0:11.60elapsed 99%CPU (0avgtext+0avgdata 294684maxresident)k
0inputs+585944outputs (0major+762minor)pagefaults 0swaps
0ae8911109ff4a32f471bd704829a44c  rayv.ppm
/usr/bin/time ./raycpp 10000 10000 raycpp.ppm && md5sum raycpp.ppm
12.09user 0.21system 0:12.32elapsed 99%CPU (0avgtext+0avgdata 296096maxresident)k
0inputs+585944outputs (0major+819minor)pagefaults 0swaps
0ae8911109ff4a32f471bd704829a44c  raycpp.ppm
/usr/bin/time ./raygo 10000 10000 raygo.ppm && md5sum raygo.ppm
15.55user 0.23system 0:15.87elapsed 99%CPU (0avgtext+0avgdata 309420maxresident)k
0inputs+585944outputs (0major+898minor)pagefaults 0swaps
0ae8911109ff4a32f471bd704829a44c  raygo.ppm

Acknowledgements

Many thanks to Aurélie Alvet for her significant Rust optimization and the Rust community for help with my initial Rust rampup. Many thanks to Cieric for his C/C++ PCG implementation. Many thanks to Delyan Angelov for his significant V optimization done to the V port (both perfs and accuracy). Many thanks to Amaury for initial rust port.

realist's People

Contributors

nsauzede avatar spytheman avatar nicolas-sauzede avatar aurelilys avatar yruamalairba avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.