ft: 13: optional defocus blur

This commit is contained in:
2026-04-29 01:17:00 +02:00
parent 076bcc7155
commit 2358f8e093
6 changed files with 111 additions and 14 deletions

View File

@@ -20,8 +20,8 @@ use crate::vec3::Vec3;
use dotenv::dotenv;
use log::info;
use pretty_env_logger;
use rand::seq::IndexedRandom;
use rand::RngExt;
use rand::seq::IndexedRandom;
fn random_material() -> Arc<dyn Material> {
let mut rng = rand::rng();
@@ -78,7 +78,7 @@ fn main() {
pretty_env_logger::init();
// TODO: use cli arg for scenefile
let json_file = "./scenes/scenes.json";
let json_file = "./scenes/scene.json";
// let json_file = "./scenes/failsMatBounds.json";
let json_str = fs::read_to_string(json_file).expect("Reading specified scene file failed!");
let mut scene: Scene = serde_json::from_str(&json_str).unwrap();