Replies: 1 comment 1 reply
-
From a quick review of the code, I believe this is just a simplification of since the vector from the ray origin to the intersection point is Unless I'm misunderstanding your question of this line. Still, I don't think this helps explain the effect you're noting above. All of this depends on the assumption that the ray is actually originating from the view position, and that the direction vector hasn't been normalized after computing |
Beta Was this translation helpful? Give feedback.
-
Hey,
I'm currently implementing ray tracing book in wgpu/wgsl/rust
I'm trying to implement https://raytracing.github.io/books/RayTracingTheRestOfYourLife.html#samplinglightsdirectly
I've tried the hard coded part and it gives me the right result (I guess)
But later when refactoring it and for having the pdf of a quad
to
I'm having something like this
Those white lines around the rectangle is provoked by the hit.t²
I've tried to look at my code at every angle and I can't find any solution ....
this is the ray_color function
Any idea on how to fix that ?
Beta Was this translation helpful? Give feedback.
All reactions