Matthew Gordon
773ca99ac1
Very inefficient first-pass at global illumination
2020-09-09 20:39:32 -04:00
Matthew Gordon
2494a30aef
Cast rays for single light wavelengths instead of RGB values
...
Colours are wrong because Spectrum class isn't implemented.
Also there's a lot of other cleanup that needs to be done.
2020-09-05 22:45:43 -04:00
Matthew Gordon
f5b0a35635
Replace nalgebra matrix and vector classes with own classes
...
Nalgebra only used to find matrix inverse now.
2020-08-28 23:08:44 -04:00
Matthew Gordon
99cf127c9f
Change a bunch of generics that used with RealType to just use f64
2020-08-18 23:12:28 -04:00
Matthew Gordon
2b8794c884
Add recursion limit to ray tracing
2020-02-28 23:25:51 -05:00
Matthew Gordon
d6b5c87759
Create Real trait to replace nalgebra::RealField
...
Real inherits RealField, but I want to add more to it.
2020-02-10 16:52:09 -05:00
Matthew Gordon
23e8a878c5
Move algebra_utils.rs into util module
2020-02-07 17:04:42 -05:00
Matthew Gordon
d98144ab74
Minor cleanup and tidying; no change in functionality.
2019-12-07 10:58:04 -05:00
Matthew Gordon
5cd80ae05c
Add sample funtion to Material trait, with default implementation
2019-11-29 22:27:43 -05:00
Matthew Gordon
dbbd855c73
Add Phong material
2019-11-27 17:05:51 -05:00
Matthew Gordon
5a0646aaa2
Bias shadow rays to fix noise in image
2019-11-23 22:08:50 -05:00
Matthew Gordon
77cf877210
Factor out Sampler struct and add shadow casting
...
There are now bad rendering artifacts which I believe are caused
by precision issues.
2019-11-23 21:36:59 -05:00
Matthew Gordon
cefbc2873b
Refactor, adding Material trait that returns a BSDF
2019-11-23 20:53:45 -05:00
Matthew Gordon
f58afb2ded
Apply tone mapping to image, not colours
...
Apply tone mapping and conversion from floats to bytes only on
final image. This will allow better tone mapping operators later
and for now removes NormalizedAsFloat trait constraints that were
creeping through everything.
2019-11-19 21:32:47 -05:00
Matthew Gordon
f13b585bfe
Shapes can now be colours other than gray
2019-11-19 07:43:00 -05:00
Matthew Gordon
98373a1935
Add missing file that should have been in earlier commit
2019-11-13 17:48:34 -05:00