From 3ab87c147df64747f940ff12ed646d83633ff45c Mon Sep 17 00:00:00 2001 From: Hui Wang <wanghehv@sjtu.edu.cn> Date: Thu, 10 Feb 2022 22:46:32 +0800 Subject: [PATCH] update readme pngs --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7ecc55f..04ae210 100644 --- a/README.md +++ b/README.md @@ -181,7 +181,7 @@ The function `rasterize_point()` is responsible for actually drawing the point. - `(target_w, target_h)` corresponds to the bottom-right of the output image - **Please assume that screen sample positions are located at half-integer coordinates in screen space. That is, the top-left sample point is at coordinate (0.5, 0.5), and the bottom-right sample point is at coordinate (target_w-0.5, target_h-0.5).** - + To rasterize points, we adopt the following rule: a point covers at most one screen sample: the closest sample to the point in screen space. This is implemented as follows, assuming (x, y) is the screen-space location of a point. @@ -262,7 +262,7 @@ Note that the vertices may be in counter-clockwise or clockwise order when passe In this task, you will extend your rasterizer to anti-alias triangle edges via supersampling. In response to the user changing the screen sampling rate (the = and - keys), the application will call `set_sample_rate()` . The parameter `sample_rate` defines the sampling rate in each dimension, so a value of 2 would correspond to a sample density of 4 samples per pixel. In this case, the samples lying within the top-left pixel of the screen would be located at locations (0.25, 0.25), (0.75, 0.25), (0.25, 0.75), and (0.75, 0.75). - + It's reasonable to think of supersampled rendering as rendering an image that is sample_rate times larger than the actual output image in each dimension, then resampling the larger rendered output down to the screen sampling rate after rendering is complete. If you take a look at the picture at the start of the 鈥淕etting Acquainted with the Starter Code鈥� section, you can get an idea of the structure you should be aiming for. Previously, you might have been going straight to `render_target` to rasterize your lines and triangles, but now you should try to add an intermediate in order to support supersampling. **Note: If you implemented your triangle rasterizer in terms of sampling coverage in screen-space coordinates (and not in terms of pixels), then the code changes to support supersampling should be fairly simple for triangles.** -- GitLab