ironheads / rusterizer

Bare-bones software renderer written in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Render

This project implements a basic OpenGL rendering pipeline.

Results

Rasterization

you can use the Rasterization Demo following

> cd dist
> python -m http.server ${PORT}

RayTracing

you can see the result of raytracing in ./image.png or following

> cargo run --release --features=raytracing

dependencies

  • rust toolchains
    • you can install the dependencies following rustup
    • if you are in china, and you can not download the crates via cargo, maybe you need to follow change crates.io sources
  • python 3
    • http.server (python3 built-in)

Build

Rasterization

Prerequisites

you can use the cargo update to add the dependencies

  • trunk
  • python3
  • rustup
  • cargo
> rustup update
> rustup default nightly
> rustup target add wasm32-unknown-unknown
> ./build.sh

Ray Tracing

> rustup update
> rustup default nightly
> cargo run --release --features=raytracing

Kudos

Rasterization Part was implemented by following the ssloy/tinyrenderer lessons.

RayTracing Part was implemented by following the Ray Tracing in One Weekend lessons.

Todos

  • make mesh hittable
  • when Rasterization, change objects's position
  • To be contined.

About

Bare-bones software renderer written in Rust


Languages

Language:Rust 97.8%Language:Shell 1.3%Language:CSS 0.9%