Commit Graph

14 Commits

Author SHA1 Message Date
2c4f103db5 Factored some calculations into the outer loop of BVH4 traversal.
Provides a small but noticable speed boost.
2017-04-16 00:51:13 -07:00
a6d8de43d7 Make BVH4 calculate and store its node count.
Useful for debugging.
2017-04-14 22:14:52 -07:00
44e3ee8b4b Fixed nasty bug in BVH4 building.
In practice it worked fine, but only by accident.  NaN's were
being passed to the lerp_slice function, which led to the
correct result in this case but is icky and dependant
on how lerp_slice is implemented.
2017-04-14 20:25:12 -07:00
7f761a9489 Added custom aligned allocations to MemArena.
Used in BVH4.
2017-04-13 23:06:56 -07:00
8b1e3a3cdb Added some dev printing info. 2017-04-13 22:50:47 -07:00
573c5da5ab Got BVH4 working. Woo hoo! 2017-04-13 22:44:34 -07:00
53a14996c9 Completed first attempt at implementing BVH4.
Completely untested, so almost certainly non-functional.  But it
compiles!
2017-04-12 23:33:34 -07:00
e0c6dfbd76 Beginnings of BVH4 implementation.
- Created a traversal-order table.
- Created a function to help index into that table.
2017-04-11 23:10:54 -07:00
a2d7f9e149 Added BBox4 and BVH4 types.
BVH4 is just a skeleton (duplicated BVH) right now.  But BBox4
is complete (pending testing).
2017-04-11 14:22:11 -07:00
d9564bc005 Refactor and rework of BVH.
The BVH building code is now largely split out into a separate
type, BVHBase.  The intent is that this will also be used by
the BVH4 when I get around to it.

The BVH itself now uses references instead of indexes, allocating
and pointing directly into the MemArena.  This allows the nodes
to all be right next to their bounding boxes in memory.
2017-04-10 23:41:38 -07:00
6623443e2e Improved .psy file parsing error messages.
Biggest improvement: it gives you line numbers.  But also progress
on better descriptions.
2017-04-10 14:03:01 -07:00
d3b3a50a4d LightTree and Assemblies use MemArena now. 2017-04-10 00:03:49 -07:00
c82c821b31 BVH and objects now use MemArena. 2017-04-09 23:33:36 -07:00
f4445417dc Reorganizing the module tree.
Enough things had accumulated that it seemed to make sense to
group some stuff together.  So here it is.
2017-02-14 00:14:08 -08:00