From 1629ab0039155790cc116a22edaaff6f75cf9ed5 Mon Sep 17 00:00:00 2001 From: Hesper Yin Date: Sun, 1 Nov 2020 16:41:32 -0500 Subject: [PATCH] Update camera_rays.md --- docs/pathtracer/camera_rays.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pathtracer/camera_rays.md b/docs/pathtracer/camera_rays.md index abc467b..e051087 100644 --- a/docs/pathtracer/camera_rays.md +++ b/docs/pathtracer/camera_rays.md @@ -18,7 +18,7 @@ This tutorial from [Scratchapixel](https://www.scratchapixel.com/lessons/3d-basi **Step 1:** Given the width and height of the screen, and point in screen space, compute the corresponding coordinates of the point in normalized ([0-1]x[0-1]) screen space in `Pathtracer::trace_pixel`. Pass these coordinates to the camera via `Camera::generate_ray` in `camera.cpp`. -**Step 2:** Implement `Camera::generate_ray`. This function should return a ray **in world space** that reaches the given sensor sample point. We recommend that you compute this ray in camera space (where the camera pinhole is at the origin, the camera is looking down the -Z axis, and +Y is at the top of the screen.). In `util/camera.h`, the `Camera` class stores `vert_fov` and `aspect_ratio` indicating the vertical field of view of the camera (in degrees, not radians) as well as the aspect ratio. Note that the camera maintains camera-space-to-world space transform matirx `iview` that will come fairly handy. +**Step 2:** Implement `Camera::generate_ray`. This function should return a ray **in world space** that reaches the given sensor sample point. We recommend that you compute this ray in camera space (where the camera pinhole is at the origin, the camera is looking down the -Z axis, and +Y is at the top of the screen.). In `util/camera.h`, the `Camera` class stores `vert_fov` and `aspect_ratio` indicating the vertical field of view of the camera (in degrees, not radians) as well as the aspect ratio. Note that the camera maintains camera-space-to-world space transform matrix `iview` that will come fairly handy. **Step 3:** Your implementation of `Pathtracer::trace_pixel` must support super-sampling. The member `Pathtracer::n_samples` specifies the number of samples of scene radiance to evaluate per pixel. The starter code will hence call `Pathtracer::trace_pixel` one time for each sample, so your implementation of `Pathtracer::trace_pixel` should choose a new location within the pixel each time. -- GitLab