caed4c67de
Do depth-first instead of breadth-first ray tracing.
...
This simplifies a lot of code, and will make experimenting with
other things a lot more straightforward.
2022-08-01 15:26:38 -07:00
d55ec9b025
Update psychopath code to work with RMath changes.
2022-07-17 17:24:58 -07:00
ea4ba81110
Use faster routines where precision isn't needed.
2022-07-16 01:09:33 -07:00
08e2e6eb06
Convert Psychopath over to use new RMath library.
2022-07-15 21:42:35 -07:00
e0ee0d6dff
Change to using a dedicated affine transform type.
...
This lets certain operations, especially matrix inversion, be
quite a bit faster. And we don't need anything beyond affine
transformations anyway.
2021-05-14 13:30:28 -07:00
022c913757
Split out memory arena into an external crate.
2019-12-27 10:43:03 +09:00
e23fe4bb36
Fix deprecation warnings from rustc.
2019-11-23 10:21:16 +09:00
e3179d5b2e
Fix stupid bug with sphere lights introduced in the traversal rewrite.
2019-07-23 08:52:53 +09:00
b09f9684d1
Remove non-SIMD BVH4, and keep more bool calculations in SIMD format.
2019-06-29 07:22:22 +09:00
2fddcae0fd
Reduced the size of a hot return value.
...
Gives a small performance boost.
2019-06-28 22:22:41 +09:00
5dd8eb919b
Changed ray batch data access to be through methods.
...
This is (potentially) just temporary. It's to make it a bit easier
to play with data layout to see how that affects performance.
2019-06-25 17:31:51 +09:00
630a79aca5
Initial implementation of ORST traversal.
...
This is a "just get it working" implementation. Performance
optimizations still need to be done.
2019-06-23 18:40:52 +09:00
112f94c127
Implemented a "Micropolygon Batch" type.
...
This is in prep for a shade-before-hit architecture. The type is
currently unused and untested.
architecture.
2018-12-28 13:40:36 -08:00
caa4ea3e44
Replaced SurfaceClosure trait with a SurfaceClosure enum.
...
Also moved surface closures to using Color internally for color
specification.
2018-12-27 22:57:44 -08:00
5add4cfdb1
Implementing Color as a simple enum rather than as a trait.
...
There's really no reason for it to be a Trait, and this will simplify
a lot of things down the road.
2018-12-27 16:09:03 -08:00
28a07de456
Improve module path usage and remove extern crate declarations where possible.
2018-12-16 13:02:49 -08:00
8deb1e87bb
First step transitioning to Rust 2018.
2018-12-16 12:02:20 -08:00
c73db2edbe
Fix/silence a bunch of clippy warnings in the main crate.
2018-12-15 23:26:12 -08:00
589a67caa4
Run latest rustfmt on code. No functional changes.
2018-12-08 13:23:44 -08:00
498c1ea8d9
Running latest rustfmt. No functional change.
2018-10-30 22:31:25 -07:00
c002514ddf
Run latest rustfmt. No functional changes.
2018-08-09 00:43:21 -07:00
97d3304149
Run new rustfmt on codebase.
2018-03-04 13:00:55 -08:00
6ff226f4fa
Whoops, nope. The last commit was a mistake.
...
It *seemed* to fix the problem I was running into, but it actually
made the SphereLight ray intersection code incorrect, and wa just
avoiding intersections that should have happened.
I should test better before committing. :-)
2017-10-25 07:09:16 -07:00
18024d43b9
Stupid bug in SphereLight ray intersection code.
...
The ray origin wasn't transformed into local space, resulting in
silly problems.
2017-10-25 06:59:35 -07:00
072d366892
Changed SurfaceLight API to return the sample point on the light.
...
More specifically: prior to this, SurfaceLights returned the
shadow ray direction vector to use. That was fine, but it
kept the responsibility of generating proper offsets (to account
for floating point error) inside the lights.
Now the SurfaceLights return the world-space point on the light
to sample, along with its surface normal and error magnitude.
This allows the robust shadow ray generation code to be in one
place inside the renderer code.
2017-08-17 13:09:48 -07:00
5a03a46ac7
Multiple importance sampling is now basically working.
...
Intersecting rectangular lights still isn't implemented, and there
are likely bugs in the MIS implementation, but it's more-or-less
working!
2017-08-16 20:04:06 -07:00
462977bd4d
WIP: multiple importance sampling.
...
Reorganized light and surface traits so that light sources are
surfaces as well, which will let them slide easily into
intersection tests with the rest of the scene geometry.
2017-08-16 18:17:50 -07:00
5c91aca002
WIP multiple importance sampling.
...
Added method for intersecting finite light sources, and implemented
the method for SphereLight.
2017-08-16 17:27:44 -07:00
c0a26819c6
Bunch of code quality improvements based on running clippy.
...
None of them change behavior, just make the code cleaner.
2017-07-22 17:21:11 -07:00
f649bec585
Reformat code with rustfmt 0.9
2017-06-15 22:00:31 -07:00
922e33ec3f
Reformat code with latest rustfmt and custom config.
2017-05-14 13:43:51 -07:00
c82c821b31
BVH and objects now use MemArena.
2017-04-09 23:33:36 -07:00
3cbb816d4b
Added DistantDiskLight (a.k.a. sun light) parsing and data structures.
...
Also created a proper World struct in the process, to store all
infinite-extent type stuff.
Note that I goofed and did a new rustfmt pass but forgot to
commit before making these changes, so there's a lot of
formatting changes in this too. *sigh*
2017-02-12 20:29:08 -08:00
c71b00ca31
LightTree now works with lights in hierarchical instancing.
2016-08-21 00:19:43 -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
f927dd0d46
Silencing a bunch of compiler warnings.
2016-06-29 15:23:07 -07:00
fd195576d1
First renders with lighting. Yay!
...
The lighting is super crappy, and pretty much hacked in. Will
need to redo this properly soon. However, this verifies that
certain other parts of the code are (mostly) working properly.
2016-06-27 23:16:39 -07:00
6f6807009b
Prepping for adding lighting.
...
The part of the renderer responsible for light transport has been
split out into a LightPath struct. Also moving over to spectral
rendering, although it's a bit silly at the moment.
2016-06-26 23:08:24 -07:00
f7e57f2aee
Scenes with lights now get parsed correctly.
2016-06-25 22:49:40 -07:00
c2d36e0d14
Beginnings of parsing sphere lights.
2016-06-23 20:46:57 -07:00
1cbf20e67f
Beginnings of light sources. Yay!
2016-06-19 14:32:13 -07:00