Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Rayito

Rayito is a simple but educational ray tracer written in Go meant as a project to learn programming languages and optimization in Computer Graphics.

"In computer graphics, ray tracing is a technique for generating an image by tracing the path of light through pixels in an image plane and simulating the effects of its encounters with virtual objects." - Wikipedia

Rayito is meant to be simple, but implements a full set of features like:

  • Multi Threading
  • Oversampling (anti aliasing)
  • Ambient and Point Lights
  • Custom Materials
  • Specular and Difuse shading (Phong)
  • Reflection (mirror)
  • Refraction (transparency)
  • Soft Shadows
  • Scene description and parsing
  • PNG Export
  • and more...

Code is meant to be as clear as possible (no cutting names on variables) so it's meant to be read directly. In order to try Rayito either clone the git repository or do:

go get github.com/phrozen/rayito

After building the binary you can start to render by using some scenes in the samples directory or write your own.

Usage

Set workers to the number of threads your CPU can handle (defaults to CPU Max Threads).

rayito -workers=8 -file="samples/scene.txt"

Samples

Helix

Spheres

About

Simple Ray Tracer written in Go.

Resources

License

Releases

No releases published

Languages

You can’t perform that action at this time.