-
Notifications
You must be signed in to change notification settings - Fork 950
Closed
Description
Here it seems the wrong vector is normalised:
raytracing.github.io/books/RayTracingTheRestOfYourLife.html
Lines 1556 to 1558 in 62ce2e6
| scattered = ray(rec.p, unit_vector(scatter_direction), r_in.time()); | |
| alb = albedo->value(rec.u, rec.v, rec.p); | |
| pdf = dot(rec.normal, scattered.direction()) / pi; |
In creating a
ray, scatter_direction is normalised while ray.direction (by convention) doesn't need to be normalised, while in calculating the cosine for the PDF value, scatter_direction is not normalised but it should.Metadata
Metadata
Assignees
Labels
No labels