Skip to content

Commit 02fff99

Browse files
rupsishollasch
authored andcommitted
Resolves #1315
1 parent d3e5bf9 commit 02fff99

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

books/RayTracingTheRestOfYourLife.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2660,6 +2660,11 @@
26602660
We can try this cosine PDF in the `ray_color()` function:
26612661

26622662
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
2663+
2664+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
2665+
#include "pdf.h"
2666+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
2667+
26632668
class camera {
26642669
...
26652670
private:
@@ -2682,7 +2687,10 @@
26822687
color color_from_emission = rec.mat->emitted(r, rec, rec.u, rec.v, rec.p);
26832688
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
26842689

2690+
2691+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
26852692
if (!rec.mat->scatter(r, rec, attenuation, scattered, pdf_val))
2693+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
26862694
return color_from_emission;
26872695

26882696

0 commit comments

Comments
 (0)