Commit Graph

68 Commits

Author SHA1 Message Date
c603e24633 Make World own its own memory, along with distant disk lights. 2022-08-07 13:54:18 -07:00
b5bf580b96 Make Camera own its own memory. 2022-08-07 13:28:00 -07:00
e244664b32 Move shader bindings to objects rather than instances. 2022-08-07 11:05:34 -07:00
608fe8bda1 Switch to colorbox and jakob upsampling for color handling. 2022-08-02 00:18:12 -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
df6aaeb527 Added parser for signed integers.
Not used at the moment, but was simple to add while I was in the
headspace for it, and it will likely be useful in the future.
2019-11-23 10:41:19 +09:00
e23fe4bb36 Fix deprecation warnings from rustc. 2019-11-23 10:21:16 +09:00
6e555456ba Updated Nom to 5.x
This makes the code a lot simpler and cleaner, among other things.
2019-11-23 10:13:29 +09:00
c753890bb0 Fix/silence various clippy warnings. 2019-08-01 14:18:26 +09:00
8e109efed5 Fixed compiler warnings. 2018-12-28 11:09:17 -08:00
1cd5d28767 Added another color temperature based way of specifying color.
This uses a normalized version of blackbody radiation, so the
colors still vary but the brightness doesn't vary nearly as
wildly as with genuine blackbody radiation.
2018-12-28 01:27:08 -08:00
53754b956c Blackbody colors are now parsed, and PsychoBlend has support as well. 2018-12-28 00:23:02 -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
caeb1d9c67 Added GGX glossy material, and simplified surface closure API. 2018-08-09 00:42:17 -07:00
6d21a30840 Formatting with newer cargo fmt.
No meaningful code change, only formatting.
2018-06-24 21:18:10 -07:00
b2576c20e7 Upgraded to Nom 2.x 2018-03-04 22:06:20 -08:00
97d3304149 Run new rustfmt on codebase. 2018-03-04 13:00:55 -08: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
ad55aa4f6d Materials are now working in both Psychopath and PsychoBlend.
Except that Emit is still not properly supported, because it needs
special handling.
2017-08-03 20:32:07 -07:00
516803e78a Got basic material parsing and rendering working.
Currently only Lambert is supported.
2017-08-03 19:31:58 -07:00
05578a1240 Implemented smooth-shaded triangle meshes.
There are still some things to do to avoid light leakage and
other weird shading in some situations, but the basics are working!
2017-07-30 17:55:03 -07:00
e77d5b7576 Refactored triangle meshes in preparation for custom normals. 2017-07-30 16:56:28 -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
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
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
c82c821b31 BVH and objects now use MemArena. 2017-04-09 23:33:36 -07:00
e9e202933f Assembly type now partially uses MemArena. 2017-04-09 18:27:01 -07:00
fc15fa9192 World type uses memory arena now. 2017-04-09 17:56:06 -07:00
57aa9be496 First steps towards using the memory arena allocator.
Changed Camera to us the memory arena allocator, and worked out a
bunch of stuff through doing that.
2017-04-09 17:31:17 -07:00
4a86c4122a Laying some groundwork for a simple shading system. 2017-03-14 00:27:25 -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
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
746b3b0c1f Replaced try!() macros with new ? operator. 2017-02-06 16:20:58 -08:00
97b5ef77f8 Code cosmetics: organize and alphabetize crate/mod/use statements. 2016-08-20 18:10:55 -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
5bc97f69b8 Actually use the background color from the scene file. 2016-07-16 13:54:41 -07:00
e2ef44f666 Finished implementing motion blur. 2016-07-10 19:20:37 -07:00
c2eb421fd8 Actually use seed in renders.
This is important for animations, where you don't want the same
noise pattern every frame.
2016-07-10 17:56:42 -07:00
5df583c2d0 Multiple light sources are now handled. 2016-07-10 00:10:49 -07:00
02a0740cac More proper use of light sources. 2016-07-01 00:00:38 -07:00