I'm studying the implementation of GetSkyRadiance function, and I'm having some difficulties understanding why the variables r_p and m_p (and m_s_p then too) are named with the _p in them here:
Length r_p =
ClampRadius(atmosphere, sqrt(d * d + 2.0 * r * mu * d + r * r));
Number mu_p = (r * mu + d) / r_p;
Number mu_s_p = (r * mu_s + d * nu) / r_p;
It seems in the documentation first two of these variables are called rd and μd, since they refer not the the point p, but instead to q (which is at the distance d from p).
Is this intentional? If yes, could you please explain why I'm wrong?
No, this is probably a copy paste effect. I agree that _d would be better here, because these variables are related to the point at distance d = shadow_length from the camera.
I'm studying the implementation of
GetSkyRadiance
function, and I'm having some difficulties understanding why the variablesr_p
andm_p
(andm_s_p
then too) are named with the_p
in them here:It seems in the documentation first two of these variables are called rd and μd, since they refer not the the point p, but instead to q (which is at the distance d from p).
Is this intentional? If yes, could you please explain why I'm wrong?