dolphin-emu/dolphin — pull request #306 by neobrain (2014-04-23 22:30:16+00:00)
Title: VertexShaderGen: Correct vertex shader output to consider shifted pixel centers.

On the console GPU, pixel centers are located at 0.58333 in screen space, rather than 0.5 as for common GPUs. Hence, primitives get rasterized incorrectly such that they may get offset by one pixel to the bottom-right.

Explanation of the discovery of this issue in bug report 267 - http://code.google.com/p/dolphin-emu/issues/detail?id=267 . This issue caused a clear quad to function improperly there, hence creating artifacts in an EFB copy which showed up as the oddly colored ground texture.

A hwtest was written for this behavior at https://github.com/dolphin-emu/hwtests/blob/872cd517cc3f8edb20161506109344652bbd02b5/gxtest/source/main.cpp#L500 and indeed it shows that indeed the pixel center is (roughly) at 7/12th in screen space. There's no real confirmation, but at least it's very close to that value, and it just makes a lot of sense given that each pixel is divided into a 12x12 grid of subsamples.