Commit graph

62 commits

Author SHA1 Message Date
Bruno BELANYI f03880799b library: render: deserialization: error on unknown 2020-03-26 18:37:42 +01:00
Bruno BELANYI 0f6b81e40c WIP: add Mesh, TriangleTexture, TriangleMaterial 2020-03-26 18:37:42 +01:00
Bruno BELANYI e65a2a1f48 WIP: add comment about path-tracing 2020-03-26 17:42:08 +01:00
Bruno BELANYI 998838a6fc library: use Intersected as a super trait 2020-03-26 17:42:08 +01:00
Bruno BELANYI 5c0fc9689e library: shape: add InterpolatedTriangle type
This is a triangle with added normal interpolation at its edges. This is
particularly useful when rendering mesh objects.
2020-03-25 00:27:26 +01:00
Bruno BELANYI 3b5410aef9 library: render: scene: add hemisphere sampling
This method takes a given normal, and computes a random ray in the
unit-hemisphere described by that normal.

We use cosine-weighted importance sampling because it leads to better
convergence and is a nice micro-optimisation (from four trigonometric
operations to only two).
2020-03-25 00:12:05 +01:00
Bruno BELANYI 965fda7395 examples: add background color to example scene 2020-03-25 00:09:49 +01:00
Bruno BELANYI 08063b5aa3 library: render: scene: add background color 2020-03-25 00:09:49 +01:00
Bruno BELANYI c2fd001430 library: render: object: remove index field 2020-03-25 00:09:49 +01:00
Bruno BELANYI 6df2d857d4 library: use beevee's Intersected trait 2020-03-24 21:55:51 +01:00
Bruno BELANYI 48bb3550cb library: use beevee instead of rust-bvh
I also used this opportunity to use `nalgebra::Unit` as much as
possible.
2020-03-24 21:55:48 +01:00
Bruno BELANYI 01d2c2d973 project: move to Cargo workspace 2020-03-24 21:47:09 +01:00