Collection of computer graphics algorithms implemented purely in Go.
Requires an installation of go 1.21 or higher. All dependencies can be manually updated using the go get command:
go get .The project provides a CLI to simplify rendering of scenes. Use the following command to show a help.
go run cmd/cli/main.go -hA few demo scenes are provided in the configs directory and can be rendered like this;
go run cmd/cli/main.go -f config/bunny.jsonThe implementation can be compared to the pt implementation. Select a scene in cmd/compare/main.go by removing the comment and run it using:
go run cmd/compare/main.goFor the best benchmark result, use the bench package:
go install golang.design/x/bench@latest
cd benchmark
bench -name BenchmarkBunny