Apress / ray-tracing-gems

Source Code for "Ray Tracing Gems: High-Quality and Real-Time Rendering with DXR and Other APIs" by Eric Haines and Tomas Akenine-Möller

Home Page:https://www.apress.com/us/book/9781484244265

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

chapter 27, the introduction of Listing 27-2 is wrong

Zieng opened this issue · comments

commented

The introduction of Listing 27-2:

Listing 27-2.This closest-hit shader code snippet skips shading of transparent surfaces when the incident ray has crossed through a user-defined maximum number of transparent surfaces, proceeding instead by shooting a transmission ray and continuing as though there had been no ray/surface intersection

is same as that of Listing 27-4:

Listing 27-4. This closest-hit shader code snippet skips the shading of transparent surfaces when the incident ray has crossed through a user-defned maximum number of transparent surfaces, proceeding instead by shooting a transmission ray and continuing as though there had been no ray/surface intersection.

and I believe the former is wrong.
I didn't see this mistake in the errata and I have checked version 1.5, 4/29/2019, it's still there.

Thanks, and querying the author.

John notes:

Eric,
Zieng is correct, there's a duplicate caption here. I'm not sure
how we missed this. It was wrong in one of the later versions of the
latex source I have. The caption for the AO listing should have said
this or some revision thereof:
\begin{lstlisting}[
caption={This short closest-hit shader code snippet implements
ambient occlusion (AO) lighting with a limited occlusion distance,
permitting AO lighting to be used within confined or fully
enclosed spaces
that would otherwise result in 100% occlusion and full shadow.},
label={lst:aomaxdist},
language=rtgCode
]
etc......


I will add this to the errata soon (but won't fix the PDF soon, as I no longer have access to Adobe Acrobat's editor).

Committed to errata page - closing issue.

This bug is now fixed in the new PDF, 1.6, at http://raytracinggems.com