File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ class box: public hittable {
34
34
hittable_list sides;
35
35
};
36
36
37
+
37
38
box::box (const vec3& p0, const vec3& p1, shared_ptr<material> ptr) {
38
39
box_min = p0;
39
40
box_max = p1;
Original file line number Diff line number Diff line change @@ -74,15 +74,15 @@ class dielectric : public material {
74
74
srec.specular_ray = ray (rec.p , reflected, r_in.time ());
75
75
return true ;
76
76
}
77
-
77
+
78
78
double reflect_prob = schlick (cos_theta, etai_over_etat);
79
79
if (random_double () < reflect_prob)
80
80
{
81
81
vec3 reflected = reflect (unit_direction, rec.normal );
82
82
srec.specular_ray = ray (rec.p , reflected, r_in.time ());
83
83
return true ;
84
84
}
85
-
85
+
86
86
vec3 refracted = refract (unit_direction, rec.normal , etai_over_etat);
87
87
srec.specular_ray = ray (rec.p , refracted, r_in.time ());
88
88
return true ;
You can’t perform that action at this time.
0 commit comments