More gui options!

This commit is contained in:
2023-12-03 22:45:49 -05:00
parent 9276088b4b
commit daed0ef0b9
6 changed files with 197 additions and 198 deletions
+11
View File
@@ -42,6 +42,11 @@ pub struct RaytracingOption {
pub diffuse_rays: u8,
pub diffuse_coefficient: f32,
pub bvh_active: bool,
pub shadows: bool,
pub diffuse: bool,
pub reflect: bool,
pub specular: bool,
pub falloff: bool,
}
impl RaytracingOption {
pub fn default() -> RaytracingOption {
@@ -58,6 +63,11 @@ impl RaytracingOption {
diffuse_rays: 3,
diffuse_coefficient: 0.8,
bvh_active: false,
shadows: true,
diffuse: true,
reflect: true,
specular: true,
falloff: true,
}
}
}
@@ -228,6 +238,7 @@ impl State {
let mut colour: Vector3<f32> = Vector3::zeros();
let ray = &rays[*index];
for _ in 0..samples {
//Generate a ray in a random direction
let point = ray.a;
let dir = ray.b;
let rx = (random::<f64>() - 0.5) / randomness;