added hemispherical scattering, switched to ppm version 6

This commit is contained in:
2023-01-30 13:50:32 +01:00
parent b27c90195a
commit 899e8b7228
6 changed files with 87 additions and 539 deletions

13
src/material.rs Normal file
View File

@@ -0,0 +1,13 @@
use crate::hittable::HitRecord;
use crate::ray::Ray;
use crate::rtweekend::*;
use crate::hittable_list::*;
use crate::vec3::Color;
pub struct Material {
}
trait Scatter {
fn scatter(r_in: &Ray, rec: HitRecord, attenuation: &Color, scattered: &Ray) -> bool;
}