A basic raytracer implementation in Rust based on the Ray Tracing in One Weekend book.

Overview

Raytracer

A basic raytracer implementation in Rust based on the Ray Tracing in One Weekend book.

Live Demo

Result

output

How to Run

Standalone Binary

$ cargo run

The above command will produce a test.ppm file in the same directory containing the rendered image.

WASM port for the Web

Install wasm-pack. Then run the following commands.

$ wasm-pack build
$ cd www
$ npm run start

It is hosted on GitHub Pages available at http://navinmohan.com/raytracer/

Adjusting the objects or camera

At this point, any changes to the scene has to be made directly inside the code. If you wish to modify the scene start with bin.rs and lib.rs.

You might also like...
Concise Reference Book for the Bevy Game Engine

Unofficial Bevy Cheat Book Click here to read the book! Concise reference to programming in the Bevy game engine. Covers useful syntax, features, prog

A basic RUST RPG created by arukovic.

Rust RPG! Hello this is a RUST RPG created by arukovic! This is just a simple RPG created by purely Rust... feel free to run it! Manually running 1st

A basic web assembly chess engine written in rust.

This library is a basic implementation of a chess min-max algorithm with alpha-beta pruning (Algorithm Info). It is designed to be compiled down to WebAssembly and used for web applications.

Basic first-person fly camera for the Bevy game engine

bevy_flycam A basic first-person fly camera for Bevy 0.4 Controls WASD to move horizontally SPACE to ascend LSHIFT to descend ESC to grab/release curs

A game made in one week for the Bevy engine's first game jam

¿Quien es el MechaBurro? An entry for the first Bevy game jam following the theme of "Unfair Advantage." It was made in one week using the wonderful B

This tool allows you to open one or more notebooks in Visual Studio and go hog wild exploring your systems in Bevy.
This tool allows you to open one or more notebooks in Visual Studio and go hog wild exploring your systems in Bevy.

Bevyrly Bevy is rly useful, but requires some hygiene! Pronounced as /ˈbɛvə(ɹ)li/, derives from Old English, combining befer ("beaver") and leah ("cle

2D and 3D physics engine based on Extended Position Based Dynamics for Bevy.

Bevy XPBD Bevy XPBD is a 2D and 3D physics engine based on Extended Position Based Dynamics (XPBD) for the Bevy game engine. Design Below are some of

Example implementation of a 3d hexagon tile-based map editor using bevy

bevy-hex-sandbox Example implementation of a 3d hexagon tile-based map editor using bevy v0.10. smol.mov This is not a maintained project. Instead, th

A rust chess implementation using a neural network scoring function built on huggingface/candle + rust + wasm

Rusty Chess What is it? Rusty Chess aims to be a high quality embeddable chess engine that runs entirely locally in the browser (no backend required).

Owner
Navin Mohan
Software Engineer @akamai
Navin Mohan
Rust-raytracer - 🔭 A simple ray tracer in Rust 🦀

rust-raytracer An implementation of a very simple raytracer based on Ray Tracing in One Weekend by Peter Shirley in Rust. I used this project to learn

David Singleton 159 Nov 28, 2022
Game physics in one weekend with bevy

Game Physics in a Weekend (in Rust) This project is an implementation of the Game Physics in a Weekend book using the Rust programming language and th

Cameron Hart 28 Dec 23, 2022
A cpu-based raytracer written in rust.

mini-raytracer A cpu-based raytracer written in rust. This project was written by me to learn about computer graphics, specifically rayracing. Feature

null 5 May 16, 2022
bevy-hikari is an implementation of voxel cone tracing global illumination with anisotropic mip-mapping in Bevy

Bevy Voxel Cone Tracing bevy-hikari is an implementation of voxel cone tracing global illumination with anisotropic mip-mapping in Bevy. Bevy Version

研究社交 208 Dec 27, 2022
Ray Tracer written in Rust

Erena A Ray Tracer written in Rust. Erena is based on the Esena project, which is written in Scala. Here is the current rendered image: See The Ray Tr

Melvic Ybanez 11 Dec 7, 2021
Non-Linear Ray Casting

linon Non-Linear Ray Casting References E. Gröller, “Nonlinear Ray Tracing: Visualizing Strange Worlds,” The Visual Computer, vol. 11, no. 5, pp. 263–

Niklas Korz 13 Dec 1, 2022
First-person 3D pong ray-traced on CPU in real time.

ray ten Run in browser ray-ten.mp4 Reimagining of a 1986 ZX Spectrum game room ten made with ray tracing. Completely ignoring GPUs when rendering 3D g

Egor 2 Aug 20, 2022
💫 create beautiful code snippets on ray.so

Rayso✨ [ Generate beautiful screenshot snippets from terminal using ray.so ] Installation ?? Source ?? $ git clone --depth=1 https://github.com/pwnwri

Nabeen Tiwaree 25 Jul 12, 2023
Integration layer between Bevy, puffin and tracing libraries

bevy_puffin This crate integrates the puffin library into Bevy. It provides PuffinTracePlugin to use as a replacement for the Bevy's default LogPlugin

Vladyslav Batyrenko 12 Jul 15, 2022
Simple retro game made using Rust bracket-lib by following "Herbert Wolverson's Hands on Rust" book.

Flappy Dragon Code from This program is a result of a tutorial i followed from Herbert Wolverson's Hands-on Rust Effective Learning through 2D Game De

Praneeth Chinthaka Ranasinghe 1 Feb 7, 2022