2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Pica/Rasterizer: Rasterize actual pixel centers instead of pixel corners.

This commit is contained in:
Tony Wasserka 2015-01-02 01:02:18 +01:00
parent 3cb22d31a7
commit 3b5710bae6

View file

@ -168,9 +168,10 @@ static void ProcessTriangleInternal(const VertexShader::OutputVertex& v0,
auto textures = registers.GetTextures(); auto textures = registers.GetTextures();
auto tev_stages = registers.GetTevStages(); auto tev_stages = registers.GetTevStages();
// Enter rasterization loop, starting at the center of the topleft bounding box corner.
// TODO: Not sure if looping through x first might be faster // TODO: Not sure if looping through x first might be faster
for (u16 y = min_y; y < max_y; y += 0x10) { for (u16 y = min_y + 8; y < max_y; y += 0x10) {
for (u16 x = min_x; x < max_x; x += 0x10) { for (u16 x = min_x + 8; x < max_x; x += 0x10) {
// Calculate the barycentric coordinates w0, w1 and w2 // Calculate the barycentric coordinates w0, w1 and w2
int w0 = bias0 + SignedArea(vtxpos[1].xy(), vtxpos[2].xy(), {x, y}); int w0 = bias0 + SignedArea(vtxpos[1].xy(), vtxpos[2].xy(), {x, y});