Disable primitive 2D pixel snapping & enforce linear only above 720p. (#346)

This commit is contained in:
Skyth (Asilkan) 2025-02-09 23:42:30 +03:00 committed by GitHub
parent 8220f6772b
commit 0b8b243404
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 8 deletions

View file

@ -1198,12 +1198,6 @@ PPC_FUNC(sub_830D1EF0)
y = g_aspectRatioOffsetY + (y + 0.5f) * g_aspectRatioScale;
}
if (Config::AspectRatio != EAspectRatio::OriginalNarrow)
{
x = round(x);
y = round(y);
}
vertex[i].x = ((x - 0.5f) / Video::s_viewportWidth) * 2.0f - 1.0f;
vertex[i].y = ((y - 0.5f) / Video::s_viewportHeight) * -2.0f + 1.0f;
}

View file

@ -76,8 +76,12 @@ PPC_FUNC(sub_830D25D8)
auto device = reinterpret_cast<GuestDevice*>(base + PPC_LOAD_U32(ctx.r4.u32));
// Set first sampler to use linear filtering.
device->samplerStates[0].data[3] = (device->samplerStates[0].data[3].get() & ~0x1f80000) | 0x1280000;
device->dirtyFlags[3] = device->dirtyFlags[3].get() | 0x80000000ull;
// NOTE: We only check for height here since all 2D primitives get centered.
if (Video::s_viewportHeight > 720)
{
device->samplerStates[0].data[3] = (device->samplerStates[0].data[3].get() & ~0x1f80000) | 0x1280000;
device->dirtyFlags[3] = device->dirtyFlags[3].get() | 0x80000000ull;
}
__imp__sub_830D25D8(ctx, base);
}