Commit Graph

17 Commits

Author SHA1 Message Date
b8321beaad Split colorspace transform functions out into their own crate.
They are now generated by a build.rs script from nothing but the
colorspace's primaries, which makes it super easy to add more
colorspaces.  So easy that I added three more: ACES AP0, ACES AP1
and Rec.2020.

This lays the foundation for supporting output to different
colorspaces.
2017-06-11 03:03:23 -07:00
922e33ec3f Reformat code with latest rustfmt and custom config. 2017-05-14 13:43:51 -07:00
8b0c422630 Small optimization in BBox intersection and bugfix in BBox4 intersection. 2017-04-26 00:28:43 -07:00
c92a8c4da0 During BVH construction, merge BBox time samples based on a threshold.
If the average surface area of all the time samples is close enough
to the surface area of their union, just take the union and use that.
This both makes the BVH smaller in memory (time samples don't
propigate up the tree beyond their usefulness) and makes it
faster since traversal can avoid interpolating BBoxes when there's
only one BBox for a node.
2017-04-23 23:15:31 -07:00
7f1ab59c5e Implemented alternative SAH split that uses off-axis split planes.
It doesn't seem to actually perform better, generally, but I'm
leaving it in for future reference for other things.
2016-08-21 15:26:47 -07:00
97b5ef77f8 Code cosmetics: organize and alphabetize crate/mod/use statements. 2016-08-20 18:10:55 -07:00
3e7b142cd8 Implemented light tree sampling, for better sampling of many lights. 2016-07-31 11:14:33 -07:00
7ef5846c89 Got rid of indexing into Float4 and 3d vector elements.
This assures correct semantics for SIMD usage.
2016-07-30 19:36:54 -07:00
4db96bc758 Use simple if-statement-based min/max functions in hot code.
Again, for whatever reason this is notably faster than the stdlib
min/max functions.
2016-07-16 17:55:18 -07:00
2e3851837d Implemented SAH splitting for the BVH. Also fixed crash bug.
The bug was in the previous commit, where I thought I was
preventing out-of-bounds access during traversal by limiting
the tree depth.  While the idea was correct, I forgot that the
traversal stack needs _2_ extra slots on top of the tree depth,
not just 1.  Fixed.
2016-07-16 03:21:57 -07:00
18245b725c All final intersections are now done in world space.
BVH traversal still happens in local space, but final actual
surface intersection calculations are done in world space by
transforming the triangle into world space.  This is to improve
numerical consistency between intersections.
2016-06-09 01:04:12 -07:00
61e3d47f56 Changed BBox/Ray intersection code to use more simd ops.
This, of course, depends on the simd ops being there, which
currently they are not.  But in the future, hopefully this will
make things speedy.  Will need to test, of course.
2016-06-08 22:57:22 -07:00
039943e0cb Auto-formatting code with new version of rustfmt. 2016-06-02 22:43:35 -07:00
901fc88f63 Assemblies now use BVH accel and actually utilize instances. 2016-04-23 13:37:38 -07:00
f87a8b4934 Forgot robustness adjustment in BBox/ray intersection code. 2015-12-29 17:01:05 -08:00
7f7870534c Implemented a very basic BVH for lists of triangles.
This isn't a good implementation by any means.  It's just to get
things started.
2015-12-29 16:56:33 -08:00
b20910a252 Created BBox, an axis-aligned 3d bounding box type. 2015-12-27 00:44:59 -08:00