-
Notifications
You must be signed in to change notification settings - Fork 11
Description
D3D8 and 9 viewport coordinates by default do not align to on-screen pixel coordinates, and must be offset by half a pixel (0.5) to correct for this discrepancy.
Notably, Sonic Adventure DX handles this incorrectly, offsetting either multiple times or simply in the wrong direction ([-0.5, -0.5] would be [0, 0] in d3d11), usually revealing a single pixel line along screen edges during full screen fades. Community fixes have been implemented for this when using D3D8 and 9, but d3d8to11 reveals the issue once more.
For reference, aras-p has a great blog post about this issue here with additional references: https://aras-p.info/blog/2016/04/08/solving-dx9-half-pixel-offset/
Because so many games get this wrong, it might make sense to make this configurable for both vertex coordinates and UV coordinates individually.