Closed CSU-NXY closed 2 years ago
As I understand, it is because the ray's origins are shifted to near plan, so it works here, I have checked the official code it is not normalized here.
@CSU-NXY You are right, I normalized the directions for simpler operations in the rendering code, but I was unaware about the bound problem. As you said, if the directions are normalized then some rays (around image boundaries) cannot reach far planes. Practically, it turns out that the objects are not too far from the cameras, so normalization works. However, the correct way should be to keep the directions unnormalized.
Hi, thanks for your excellent work!
I'm wondering why the
rays_d
is normalized inget_rays()
When rendering,
rays_d
is multiplied byz_vals
which varies fromnear
tofar
. Ifrays_d
is normalized, it seems that we cannot sample points on the far plane and some points closer than near plane may be sampled.I'm just confused about it. Could you please give me some hints?