Commit graph

115 commits

Author SHA1 Message Date
Bruno BELANYI eff133abf3 library: texture: uniform: add deserialization 2020-03-18 14:38:26 +01:00
Bruno BELANYI 803b34641d library: material: uniform: add deserialization 2020-03-18 14:38:17 +01:00
Bruno BELANYI 7ce201ecc2 library: light: spot: add deserialization 2020-03-18 14:38:01 +01:00
Bruno BELANYI 3ef827cabf library: light: spot: fix constructors
The vector was not normalized on input in the SpotLight constructor...
2020-03-18 14:37:16 +01:00
Bruno BELANYI ebe00365d1 library: light: point: add deserialization 2020-03-18 14:36:28 +01:00
Bruno BELANYI 42abfed3fa library: light: directional: add deserialization 2020-03-18 14:35:53 +01:00
Bruno BELANYI 85f274a0b1 library: light: ambient: add deserialization 2020-03-18 14:35:19 +01:00
Bruno BELANYI 9dcce9218f library: material: uniform: fix float comparison 2020-03-18 14:34:37 +01:00
Bruno BELANYI 76db818fa8 library: serialize: add vector_normalizer helper 2020-03-18 14:31:33 +01:00
Bruno BELANYI a90d4d9405 library: add serialize module 2020-03-18 14:31:17 +01:00
Bruno BELANYI 076118edaa library: core: camera: add deserialization 2020-03-18 13:03:12 +01:00
Bruno BELANYI 0644d453b8 library: core: color: add deserialization 2020-03-18 13:03:02 +01:00
Bruno BELANYI 22b109212c project: add deserialization feature of nalgebra 2020-03-18 11:51:59 +01:00
Bruno BELANYI c16db361ea project: add typetag dependency 2020-03-18 11:47:07 +01:00
Bruno BELANYI 0f87626b66 project: add serde_yaml dependency 2020-03-18 11:46:56 +01:00
Bruno BELANYI b59c6ee50d project: add Serde dependency 2020-03-18 11:46:03 +01:00
Bruno BELANYI 670b076ec6 library: render: object: remove unused annotation 2020-03-18 00:19:42 +01:00
Bruno BELANYI 3386617c69 library: render: scene: add reflection
This required changing the place were the normal, the texel projection,
and the reflection were calculated to avoid possibly expensive lookups.

I also changed the style a bit to make it more readable.
2020-03-18 00:17:03 +01:00
Bruno BELANYI d8f5f880ec library: material: add reflectivity
This necessitates adding it to the trait, and its implementations.
2020-03-18 00:08:23 +01:00
Bruno BELANYI 6a829a96fd library: render: add Scene implementation 2020-03-18 00:08:23 +01:00
Bruno BELANYI c53d50f165 project: add rand dependency 2020-03-17 23:42:32 +01:00
Bruno BELANYI 58f9a508dc library: core: color: add image::Rgbconversion 2020-03-17 23:28:24 +01:00
Bruno BELANYI e9eaabcd0a library: core: color: add derive Sum 2020-03-17 23:27:57 +01:00
Bruno BELANYI cbcc5ff03e project: add image dependency 2020-03-17 23:25:41 +01:00
Bruno BELANYI 7dc622b9e7 library: core: film: add width/height methods 2020-03-17 23:25:29 +01:00
Bruno BELANYI 4c7085ab16 library: core: film: use float for pixel_ratio 2020-03-17 23:24:48 +01:00
Bruno BELANYI 197e8104e0 library: render: light_aggregate: add *_iter
You can iterate over the two types of lights in the aggregate: the ones
implementing `SpatialLight`, and the ones that are only `Light`.
2020-03-17 22:47:30 +01:00
Bruno BELANYI d6f5f29a2a library: render: rename LightAggregate fields 2020-03-17 22:46:25 +01:00
Bruno BELANYI 852cd65c6a library: render: add LightAggregate implementation 2020-03-17 20:49:49 +01:00
Bruno BELANYI 7112873715 library: replace super::super by crate import
Done with the following shell command:
`sed -e 's/super::super/crate/' -i $(git grep -l super::super)`.

Followed by a `cargo fmt --all`.
2020-03-17 20:49:30 +01:00
Bruno BELANYI 4f3af74c22 library: render: add Object implementation 2020-03-17 20:44:47 +01:00
Bruno BELANYI 2dab475f68 library: add render module 2020-03-17 19:30:01 +01:00
Bruno BELANYI dd6b50f785 library: texture: add UniformTexture implementation 2020-03-17 19:29:33 +01:00
Bruno BELANYI 63feed70c6 library: texture: add Texture trait definition 2020-03-17 19:29:33 +01:00
Bruno BELANYI 4052dd41d3 library: add texture module 2020-03-17 19:29:29 +01:00
Bruno BELANYI d785800bfe library: material: split Material into trait
The former `Material` type is now `UniformMaterial` and implements the
`Material` trait.
2020-03-17 19:29:05 +01:00
Bruno BELANYI 2a36728468 library: material: add Material implementation 2020-03-17 19:17:52 +01:00
Bruno BELANYI 9fa0da1b83 library: add material module 2020-03-17 19:17:52 +01:00
Bruno BELANYI 48b3f03d40 library: core: color: add Mul-like ops by self 2020-03-17 19:17:52 +01:00
Bruno BELANYI 2dd5c675af library: core: add Camera implementation 2020-03-17 19:17:52 +01:00
Bruno BELANYI a4caa456ce library: core: add Film implementation 2020-03-17 19:17:52 +01:00
Bruno BELANYI 8d6d4cf7d7 library: shape: add Triangle implementation 2020-03-16 22:22:13 +01:00
Bruno BELANYI 2088877bd2 library: light: add SpotLight implementation 2020-03-16 18:35:32 +01:00
Bruno BELANYI 3a487d956e library: light: add AmbientLight implementation 2020-03-16 17:54:44 +01:00
Bruno BELANYI d759c16f5d library: light: add DirectionalLight implementation 2020-03-16 17:52:33 +01:00
Bruno BELANYI 22167a1b93 library: light: add PointLight implementation 2020-03-16 17:45:35 +01:00
Bruno BELANYI 7c8cc0d970 library: shape: add Sphere implementation 2020-03-16 17:29:11 +01:00
Bruno BELANYI 7d28e21a70 library: move from f64 to f32
They are faster to compute with, take less space --which means faster
access because we use less cache lines--, and they are what is used by
`bvh`...
2020-03-16 17:26:04 +01:00
Bruno BELANYI 5d03df960c project: use non-nightly image by default in CI
Only use the nightly features for `cargo fmt`. This avoids having the CI
be red because `clippy` is not available for the nightly version that
was used to run it.
2020-03-16 16:36:13 +01:00
Bruno BELANYI 31272bceac library: core: color: add arithmetic operations
The only operations that are not supported right now are term-by-term
division and multiplication between two colors.

I deemed the multiplication and division by a scalar more important than
those operations for the moment.
2020-03-16 16:14:40 +01:00