diff options
| author | 2015-01-02 01:02:18 +0100 | |
|---|---|---|
| committer | 2015-02-18 14:50:28 +0100 | |
| commit | 3b5710bae662dbd20b54736362c6f72888b9009e (patch) | |
| tree | 40b3eaa34e3c5b3c1a1fb5102448c1d371ee1595 /src/video_core/rasterizer.cpp | |
| parent | Pica/Rasterizer: Fix garbage pixels at triangle borders. (diff) | |
| download | yuzu-3b5710bae662dbd20b54736362c6f72888b9009e.tar.gz yuzu-3b5710bae662dbd20b54736362c6f72888b9009e.tar.xz yuzu-3b5710bae662dbd20b54736362c6f72888b9009e.zip | |
Pica/Rasterizer: Rasterize actual pixel centers instead of pixel corners.
Diffstat (limited to 'src/video_core/rasterizer.cpp')
| -rw-r--r-- | src/video_core/rasterizer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/video_core/rasterizer.cpp b/src/video_core/rasterizer.cpp index 74182abef..168a2ada0 100644 --- a/src/video_core/rasterizer.cpp +++ b/src/video_core/rasterizer.cpp | |||
| @@ -168,9 +168,10 @@ static void ProcessTriangleInternal(const VertexShader::OutputVertex& v0, | |||
| 168 | auto textures = registers.GetTextures(); | 168 | auto textures = registers.GetTextures(); |
| 169 | auto tev_stages = registers.GetTevStages(); | 169 | auto tev_stages = registers.GetTevStages(); |
| 170 | 170 | ||
| 171 | // Enter rasterization loop, starting at the center of the topleft bounding box corner. | ||
| 171 | // TODO: Not sure if looping through x first might be faster | 172 | // TODO: Not sure if looping through x first might be faster |
| 172 | for (u16 y = min_y; y < max_y; y += 0x10) { | 173 | for (u16 y = min_y + 8; y < max_y; y += 0x10) { |
| 173 | for (u16 x = min_x; x < max_x; x += 0x10) { | 174 | for (u16 x = min_x + 8; x < max_x; x += 0x10) { |
| 174 | 175 | ||
| 175 | // Calculate the barycentric coordinates w0, w1 and w2 | 176 | // Calculate the barycentric coordinates w0, w1 and w2 |
| 176 | int w0 = bias0 + SignedArea(vtxpos[1].xy(), vtxpos[2].xy(), {x, y}); | 177 | int w0 = bias0 + SignedArea(vtxpos[1].xy(), vtxpos[2].xy(), {x, y}); |