-
Notifications
You must be signed in to change notification settings - Fork 887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unused line of code, "The Next Week" main.cc #317
Comments
It's a hold over from an old revision of the source. It is a bug.
It should be fixed in the `development` branch.
For any issues you find, check against the `development` branch.
…On Fri, Jan 3, 2020, 04:16 Chris Gyurgyik ***@***.***> wrote:
In the main.cc file,
You have:
camera cam(lookfrom, lookat, vec3(0,1,0), vfov, float(nx)/float(ny), aperture, dist_to_focus, 0.0, 1.0);
for (int j = ny-1; j >= 0; j--) {
for (int i = 0; i < nx; i++) {
vec3 col(0, 0, 0);
for (int s=0; s < ns; s++) {
float u = float(i+random_double())/ float(nx);
float v = float(j+random_double())/ float(ny);
ray r = cam.get_ray(u, v);
vec3 p = r.point_at_parameter(2.0);
col += color(r, world,0);
}
col /= float(ns);
col = vec3( sqrt(col[0]), sqrt(col[1]), sqrt(col[2]) );
int ir = int(255.99*col[0]);
int ig = int(255.99*col[1]);
int ib = int(255.99*col[2]);
std::cout << ir << " " << ig << " " << ib << "\n";
}
}
}
Is vec3 p = r.point_at_parameter(2.0); necessary for anything?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#317?email_source=notifications&email_token=ACNZVKFYM6MARVPYU2YVPCDQ34UB7A5CNFSM4KCM3QVKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ID3TGVQ>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACNZVKBUYY54HTHLCAU7FXLQ34UB7ANCNFSM4KCM3QVA>
.
|
Ugh. Another fix that didn't make it to all locations. It's in code for TheNextWeek, and in books 1 & 2. |
I can only find it in where else did you find it? |
|
The Check any issues against the
This still needs to be removed from Was it somewhere else in the |
Gah! I submitted the fix in 66d3d46, but apparently didn't close this issue. Which is fine, because I'd missed the one in The Rest Of Your Life. |
Done. |
In the main.cc file,
You have:
Is
vec3 p = r.point_at_parameter(2.0);
necessary for anything?The text was updated successfully, but these errors were encountered: