Skip to content

Commit 94753a6

Browse files
authored
Merge pull request #708 from estshorter/fix-issue-694
Fix: Book2: Listing 70 (#694)
2 parents a58418c + a5b8190 commit 94753a6

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Change Log -- Ray Tracing in One Weekend
1515
- Fix: Listing 15: In `bvh.h`, add missing `hittable_list.h` include (#690)
1616
- Fix: Listing 33, 34, 38: Change implicit casts to explicit ones (#692)
1717
- Fix: Listing 40: Change `perlin.h` in the caption to `texture.h` (#698)
18+
- Fix: Listing 70: Add missing `bvh.h` (#694)
19+
- Fix: Listing 70 and `main.cc`: Change a fuzz value of a metal sphere to 1.0 which is the maximum value (#694)
1820

1921

2022
----------------------------------------------------------------------------------------------------

books/RayTracingTheNextWeek.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3247,6 +3247,10 @@
32473247
why we get caustics and subsurface for free. It’s a double-edged design decision.
32483248

32493249
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
3250+
...
3251+
#include "bvh.h"
3252+
...
3253+
32503254
hittable_list final_scene() {
32513255
hittable_list boxes1;
32523256
auto ground = make_shared<lambertian>(color(0.48, 0.83, 0.53));
@@ -3280,7 +3284,7 @@
32803284

32813285
objects.add(make_shared<sphere>(point3(260, 150, 45), 50, make_shared<dielectric>(1.5)));
32823286
objects.add(make_shared<sphere>(
3283-
point3(0, 150, 145), 50, make_shared<metal>(color(0.8, 0.8, 0.9), 10.0)
3287+
point3(0, 150, 145), 50, make_shared<metal>(color(0.8, 0.8, 0.9), 1.0)
32843288
));
32853289

32863290
auto boundary = make_shared<sphere>(point3(360,150,145), 70, make_shared<dielectric>(1.5));

src/TheNextWeek/main.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ hittable_list final_scene() {
236236

237237
objects.add(make_shared<sphere>(point3(260, 150, 45), 50, make_shared<dielectric>(1.5)));
238238
objects.add(make_shared<sphere>(
239-
point3(0, 150, 145), 50, make_shared<metal>(color(0.8, 0.8, 0.9), 10.0)
239+
point3(0, 150, 145), 50, make_shared<metal>(color(0.8, 0.8, 0.9), 1.0)
240240
));
241241

242242
auto boundary = make_shared<sphere>(point3(360,150,145), 70, make_shared<dielectric>(1.5));

0 commit comments

Comments
 (0)