|
1086 | 1086 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
|
1087 | 1087 | vec3 ray_color(const ray& r, const hittable& world) {
|
1088 | 1088 | hit_record rec;
|
1089 |
| - if (world.hit(r, 0.001, infinity, rec)) { |
| 1089 | + if (world.hit(r, 0, infinity, rec)) { |
1090 | 1090 | return 0.5 * (rec.normal + vec3(1,1,1));
|
1091 | 1091 | }
|
1092 | 1092 |
|
|
1409 | 1409 | vec3 ray_color(const ray& r, const hittable& world) {
|
1410 | 1410 | hit_record rec;
|
1411 | 1411 |
|
1412 |
| - if (world.hit(r, 0.0, infinity, rec)) { |
| 1412 | + if (world.hit(r, 0, infinity, rec)) { |
1413 | 1413 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
|
1414 | 1414 | vec3 target = rec.p + rec.normal + random_in_unit_sphere();
|
1415 | 1415 | return 0.5 * ray_color(ray(rec.p, target - rec.p), world);
|
|
1438 | 1438 | if (depth <= 0)
|
1439 | 1439 | return vec3(0,0,0);
|
1440 | 1440 |
|
1441 |
| - if (world.hit(r, 0.001, infinity, rec)) { |
| 1441 | + if (world.hit(r, 0, infinity, rec)) { |
1442 | 1442 | vec3 target = rec.p + rec.normal + random_in_unit_sphere();
|
1443 | 1443 | return 0.5 * ray_color(ray(rec.p, target - rec.p), world, depth-1);
|
1444 | 1444 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
|
|
0 commit comments