Repository navigation
Replies: 6 comments 4 replies
|
For the scene in question, I believe the focus distance should be 3.4. A quick glance through your code seems to show that everything else is ok. |
0 replies
|
Checking again, and the settings in my repo match the settings in the book outside of accidentally committing when I halved the defocus angle as a test. |
0 replies
|
Hmmm. I looked through things again, and didn't find anything that jumped out at me. Looks like it's debugger time. |
0 replies
|
With a bit of examination, I think I've seen the issue: |
0 replies
|
Okay, trying a definitely good implementation of sampling the unit disk: pub fn random_in_unit_disk() -> Vector3<f64> {
let theta = fastrand::f64() * TAU;
let r = fastrand::f64().sqrt();
Vector3::new(r * theta.cos(), r * theta.sin(), 0.)
}and confirming that the |
4 replies
|
It's now resolved, thanks so much to @armansito! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I've completed the first book, and while I've mostly managed to get it working, the only issue that I'm having is with the depth of field implementation. My code is in Rust and at https://github.com/typedrat/rayromano, enabling the depth of field by setting the angle to be non-zero makes the entire image uniformly blurry.
All reactions