From 9857879a758e99e1f8973bea008184d0ed7e9ea8 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 19 Mar 2020 12:59:04 +0100 Subject: [PATCH] library: render: scene: optional deserialization --- src/render/scene.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/render/scene.rs b/src/render/scene.rs index b1d9066..578ea48 100644 --- a/src/render/scene.rs +++ b/src/render/scene.rs @@ -211,9 +211,13 @@ fn reflected(incident: Vector, normal: Vector) -> Vector { #[derive(Debug, PartialEq, Deserialize)] struct SerializedScene { camera: Camera, + #[serde(default)] lights: LightAggregate, + #[serde(default)] objects: Vec, + #[serde(default)] aliasing_limit: u32, + #[serde(default)] reflection_limit: u32, }