Skip to content

Commit

Permalink
try to solve pb
Browse files Browse the repository at this point in the history
  • Loading branch information
bvarillon committed May 13, 2022
1 parent b54187b commit cd00e92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Sphere.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ bool Sphere::hit(const Ray& r, double t_min, double t_max, hit_record& rec) cons

rec.t = root;
rec.p = r.at(root);
rec.set_face_normal(r, (rec.p - center) / radius);
// rec.set_face_normal(r, (rec.p - center) / radius);
rec.set_face_normal(r, unit_vector(rec.p - center));
rec.mat_ptr = mat_ptr;

return true;
Expand Down

0 comments on commit cd00e92

Please sign in to comment.