Giter Club home page Giter Club logo

rayst's Introduction

rayst

LICENSE

Rust port of the postcard-sized raytracer from Andrew Kensler distributed by Pixar at GHC 2018. The initial code written in C/C++ is described by Fabien Sanglard in a detailed blog post.

Result image, 256 samples per pixel

Disclaimer: This Rust port produces the same image as the original C/C++ code, which has been optimized for source code size and is therefore highly de-optimized in terms of performance. On top of that, this is a naive Rust port and my first ever Rust program, so it likely contains extra inefficiencies. I have no intention of even trying to optimize the raytracer, but feedback on the Rust code itself is encouraged!

Usage

As with the original code, this generates a PPM image on the standard output, best redirected to a file:

rayst > pixar.ppm

After that the image can be opened with any tool supporting the PPM format, like Gimp for example.

Earlier version

Andrew Kensler wrote an earlier postcard-sized raytracer before the one ported here, and presents some details about it in a blog post along with some more explanations and a commented code version. Several ports of that earlier code are mentioned, including a Rust port by Huon Wilson.

rayst's People

Contributors

djeedai avatar

Stargazers

GAURAV avatar Johann Woelper avatar David Dias avatar Ege Çıklabakkal avatar Marco Quinten avatar Willi Kappler avatar Dustin Bensing avatar Markus Kohlhase avatar Alex avatar

Watchers

 avatar

Forkers

krewenki icodein

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.