MakisChristou / rtxon

A Raytracer I made for fun and learning.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rtxon

Yet another Golang raytracer implementation. The goal of this project is to familiarize myself with Go as well as learn a bit of Raytracing basics on the side. The source code is my implementation of Ray Tracing in One Weekend by Peter Shirley.

Sample Render

Scene 5

Features

  • Basic materials (Lambertian, Metal, Dielectric, Emmisive)
  • Supported objects (Sphere)
  • Positionable camera
  • Anti aliasing

Build

Assuming you have go on your system just do

$ make build

Run

$ rtxon --width 1920 --samples 500 --depth 100 --scene 1 > file.ppm

Cli arguments

$ rtxon --help
Render generates a PPM image based on provided CLI parameters

Usage:
  render [flags]

Flags:
  -d, --depth int       max bounces a ray can do (default 50)
  -h, --help            help for render
  -s, --samples float   samples per pixel (default 256)
  -w, --width int       width of the image (default 1280)

Renders

Scene 1

Scene 1

Scene 3

Scene 1

About

A Raytracer I made for fun and learning.

License:GNU General Public License v3.0


Languages

Language:Go 98.0%Language:Makefile 2.0%