Skip to content

Half-pixel offset compensation not implemented #25

@michael-fadely

Description

@michael-fadely

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.

Metadata

Metadata

Labels

accuracySomething is not accurate to native D3D8 rendering

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions