Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gargakshit/plasticine
Yet another CPU Ray Tracer
https://github.com/gargakshit/plasticine
Last synced: 1 day ago
JSON representation
Yet another CPU Ray Tracer
- Host: GitHub
- URL: https://github.com/gargakshit/plasticine
- Owner: gargakshit
- License: mit
- Created: 2022-10-12T05:45:33.000Z (over 2 years ago)
- Default Branch: develop
- Last Pushed: 2022-10-15T07:32:40.000Z (over 2 years ago)
- Last Synced: 2025-01-15T02:58:20.261Z (4 days ago)
- Language: Go
- Size: 1.09 MB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Plasticine
A tiny ray tracer made using Go following the
[Ray Tracing in One Weekend](https://raytracing.github.io/books/RayTracingInOneWeekend.html)
book. One part of my adventures with computer graphics, and how to render them
in software.This one does go beyond by running the ray tracing in parallel on all CPU cores.
## Running
```shell
$ mkdir out
$ go run ./...
```An output image will be created at `out/out.png`.
![A render of 3 spheres](./render.png)
The render was done with the resolution of `1440x810` with 256 samples and 96
light bounces (`main.maxDepth`). Took 22.395 seconds on my Ryzen 7 5800U.## Scene
The scene is currently hardcoded in [object/world.go](./object/world.go), and
only supports spheres as the meshes. Currently implemented shaders include
[diffuse](./object/lambertian.go), [metal](./object/metal.go) and
[dielectric](./object/dielectric.go).