Skip to content

tiegz/raytracer-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jun 26, 2022
1206d12 · Jun 26, 2022
Jun 20, 2022
Jun 26, 2022
Jun 26, 2022
Dec 9, 2020
Dec 9, 2020
Dec 23, 2019
Feb 17, 2019
Dec 9, 2020
Jun 20, 2022
Jun 12, 2020
Dec 9, 2020
Dec 9, 2020

Repository files navigation

raytracer-go

A raytracer in Go.

This is an implementation of "The Ray Tracer Challenge" by Jamis Buck, which teaches you how to write a raytracer using language-agnostic BDD/Cucumber tests.

Installation

To install using go: go get https://github.com/tiegz/raytracer-go

Usage

  • raytracer-go example: render an example
  • raytracer-go version: print version
  • raytracer-go help: print instructions

Introduction to the Types

Here are the types used in the raytracer (generated using github.com/tiegz/pkgviz-go):

Testing

  • Run all tests: go test ./...
  • Run all benchmarks: go test ./... -bench=.
    • Benchmarking philosophy: focus on methods that are crucial to rendering and could possibly be affected by regressions. Avoid benchmarking things that are simple Go operations (+-/*) and/or won't change much (e.g. Tuple.Add()).
    • Benchmark comparisons are reported in the GitHub Action for each commit now.

Packages

No packages published

Languages