Merge branch 'master' of https://github.com/firox263/tinyray into master

This commit is contained in:
Matthew Jakeman 2020-11-20 02:03:07 +13:00
commit 23a259647e

View file

@ -1,5 +1,5 @@
# tinyray
A simple raytracer in exactly 450 lines of C
A simple raytracer in exactly 450 lines of C-code.
![Output](output.bmp)
@ -13,6 +13,26 @@ A simple raytracer in exactly 450 lines of C
* Gradient Background
* Watermark
### Building
Find a compiler and build `tinyray.c`. Run the executable and it'll create an image called 'output.bmp' in that directory. Simple as that!
Some examples:
```
# Building with gcc
$ gcc tinyray.c -o "tinyray"
# Building with cl
> cl tinyray.c
```
tinyray uses [the excellent stb_image_write library](https://github.com/nothings/stb/blob/master/stb_image_write.h) for outputting a bitmap image.
### License
Public Domain - Do whatever you like!
Credit would be very much appreciated though :)
### Helpful Resources
I created this toy raytracer to learn about basic raytracing (and for fun, of course), taking inspiration from the following resources:
- [Gabriel Gambetta: Computer Graphics From Scratch](https://www.gabrielgambetta.com/computer-graphics-from-scratch/basic-ray-tracing.html)