Update README.md with build instructions + license

This commit is contained in:
Matt Jakeman 2020-11-20 01:58:43 +13:00 committed by GitHub
parent c02be0fa2f
commit 01938278e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)
@ -12,6 +12,26 @@ A simple raytracer in exactly 450 lines of C
* Output to image with stb_image
* 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: