Should the random_on_hemisphere()
function be used for Lambertian reflection in section 9.4?
#1574
Milestone
random_on_hemisphere()
function be used for Lambertian reflection in section 9.4?
#1574
When I read the new line of code:
vec3 direction = rec.normal + random_unit_vector();
I'm confused. According to the descreption, we want to select the tangent unit sphere that is on the same side of the surface as the ray origin.
The
random_on_hemisphere()
function takes into account the reflection on the side of the incident light, while therandom_unit_vector()
function may get the light pointing inside the sphere.And I got a picture more shadow under the small sphere. But I'm sorry the picture failed to upload.
The text was updated successfully, but these errors were encountered: