A ray tracer written in Golang. Implemented with much help from the tremendous book by Jamis Buck, The Ray Tracer Challenge.
- Golang installed
make build
builds the ray tracer binary.
Specify a scene file when running:
./gtracer --scene my-scene.yaml
Both YAML and JSON file types are supported. See the demo/
directory for some example scenes. The schema for the scene file can be viewed here.
Important Notes:
- In a scene definition, children listed in either a group or csg need to be defined as a top level object (either as shape, file, group, or csg) in order to be properly referenced.
- Child objects must be defined before their parents.
- As of now, materials defined on a child within nested groups may not be honored. For best results, avoid nested groups and csgs.