From f252823b4bb1b6b1cc104c41497642f4c149feb4 Mon Sep 17 00:00:00 2001 From: Phireh Date: Sat, 21 Aug 2021 22:28:48 +0200 Subject: [PATCH] Fix shadow acne --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 26aafc2..8f30161 100644 --- a/main.cpp +++ b/main.cpp @@ -19,7 +19,7 @@ color ray_color(const ray& r, const hittable& world, int32_t depth) } hit_record rec; - if (world.hit(r, 0, INFINITY, rec)) + if (world.hit(r, 0.001, INFINITY, rec)) { point3 target = rec.p + rec.normal + random_in_unit_sphere(); return 0.5 * ray_color(ray(rec.p, target - rec.p), world, depth-1);