ft (wip): deserialization

This commit is contained in:
2026-04-25 14:46:03 +02:00
parent ef8da70436
commit 430bdf63bc
15 changed files with 421 additions and 158 deletions

View File

@@ -1,4 +1,5 @@
use rand::RngExt;
use serde::Deserialize;
use crate::{
objects::{hit::Hit, materials::traits::Material},
@@ -6,6 +7,7 @@ use crate::{
vec3::{Colour, Vec3},
};
#[derive(Debug, Deserialize)]
pub struct Lambertian {
albedo: Colour,
prob: f32,
@@ -42,6 +44,7 @@ impl Material for Lambertian {
}
}
#[derive(Debug, Deserialize)]
pub struct Metal {
albedo: Colour,
prob: f32,