Commit Graph

13 Commits

Author SHA1 Message Date
Matthew Gordon 34232bb7d3 Refactor Bsdf to not store references to material struct members
This complicated the Material trait with explicit lifetimes and
had no real benefit.
2020-04-03 23:12:40 -04: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 e1de889d3a Quick-and-dirty multithreading
Not the best multithreading scheme and needs error handling, but
it works.
2019-12-21 10:07:53 -05:00
Matthew Gordon a7e1f1c134 Add type alias for the return type of Material::bsdf() 2019-12-07 10:58:04 -05:00
Matthew Gordon 6f1663f616 Fix issue with noise in refrections
The BSDF for Reflective material had rounding issues that would
sometimes make the reflection strength NaN.
2019-11-30 11:26:18 -05:00
Matthew Gordon 8b0b8c59ba Add ReflectiveMaterial material type
Although there's still some issues with rendering the reflections.
2019-11-29 22:30:08 -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 e7bcc9cc62 Add diffuse strength term to LambertianMaterial 2019-11-26 07:17:27 -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 ad7d0b5f17 Started materials module. 2019-11-17 20:26:39 -05:00