rtiow: implement EnvMap in parser.
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
[scene]
|
||||
width = 768
|
||||
height = 768
|
||||
subsamples = 1000
|
||||
#subsamples = 1000
|
||||
|
||||
[camera]
|
||||
lookfrom = [0.0, 10.0, 0.0]
|
||||
lookfrom = [0.0, 10.0, -100.0]
|
||||
lookat = [0.0, 0.0, 0.0]
|
||||
fov = 45.0
|
||||
fov = 45
|
||||
aspect = 1
|
||||
aperture = 0.0
|
||||
focus_dist = 10.0
|
||||
@@ -22,3 +22,6 @@ radius = 10
|
||||
[[spheres]]
|
||||
center = [-30.0, 0.0, 0.0]
|
||||
radius = 10
|
||||
|
||||
[envmap]
|
||||
path = "/home/wathiede/src/xinu.tv/raytracers/rtiow/renderer/images/52681723945_e1d94d3df9_6k.jpg"
|
||||
|
||||
@@ -65,7 +65,7 @@ fn main() -> Result<()> {
|
||||
let s = std::fs::read_to_string(config)?;
|
||||
let cfg: Config = toml::from_str(&s)?;
|
||||
println!("{:#?}", cfg);
|
||||
cfg.into()
|
||||
cfg.try_into()?
|
||||
}
|
||||
_ => unreachable!(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user