Fix shadow acne
This commit is contained in:
parent
4497cc7f68
commit
f252823b4b
1 changed files with 1 additions and 1 deletions
2
main.cpp
2
main.cpp
|
|
@ -19,7 +19,7 @@ color ray_color(const ray& r, const hittable& world, int32_t depth)
|
||||||
}
|
}
|
||||||
|
|
||||||
hit_record rec;
|
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();
|
point3 target = rec.p + rec.normal + random_in_unit_sphere();
|
||||||
return 0.5 * ray_color(ray(rec.p, target - rec.p), world, depth-1);
|
return 0.5 * ray_color(ray(rec.p, target - rec.p), world, depth-1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue