library: render: scene: optional deserialization
This commit is contained in:
parent
8778ce81b7
commit
9857879a75
|
@ -211,9 +211,13 @@ fn reflected(incident: Vector, normal: Vector) -> Vector {
|
||||||
#[derive(Debug, PartialEq, Deserialize)]
|
#[derive(Debug, PartialEq, Deserialize)]
|
||||||
struct SerializedScene {
|
struct SerializedScene {
|
||||||
camera: Camera,
|
camera: Camera,
|
||||||
|
#[serde(default)]
|
||||||
lights: LightAggregate,
|
lights: LightAggregate,
|
||||||
|
#[serde(default)]
|
||||||
objects: Vec<Object>,
|
objects: Vec<Object>,
|
||||||
|
#[serde(default)]
|
||||||
aliasing_limit: u32,
|
aliasing_limit: u32,
|
||||||
|
#[serde(default)]
|
||||||
reflection_limit: u32,
|
reflection_limit: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue