pathtracer

module
v0.0.0-...-e996cf0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2020 License: MIT

README

pathtracer

Pathtracer written in Go example

Description

Simple unidirectional pathtracer written just for fun.

Supports:

  • Spheres and Planes
  • Diffuse, transparent or reflective materials
  • Movable camera
  • Multithreaded rendering and AVX2 accelerated ray transforms

Based on or inspired by:

Image 1

example 2048 samples, 1280x960, 4 bounces per sample. Took 1h46m to render on MacBook Pro mid 2014. The transparent sphere reflects 10% av incoming rays and refracts 90%. There seems to be some caustics in play here given the highlight beneath the sphere, although it feels a bit wrong that the caustics isn't visible somehow in the bottom of the sphere?

Image 2

example 4096 samples, 1280x960, 3 bounces per sample. Took 2h3m to render on MacBook Pro mid 2014. The left sphere is 100% reflective. Note that this image uses a different "ray in hemisphere" implementation that has some kind of cosine-weighted random distribution in the surface normal direction.

Directories

Path Synopsis
cmd
pt
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL