mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 21:28:51 +00:00
D3D9: Fix texel to pixel mapping when sampling textures properly.
This commit is contained in:
parent
fee98b426b
commit
7a1744575d
5 changed files with 16 additions and 3 deletions
|
@ -493,6 +493,13 @@ const char *GenerateVertexShaderCode(u32 components, API_TYPE api_type)
|
|||
//seems to get rather complicated
|
||||
}
|
||||
|
||||
if (api_type & API_D3D9)
|
||||
{
|
||||
// D3D9 is addressing pixel centers instead of pixel boundaries in clip space.
|
||||
// Thus we need to offset the final position by half a pixel
|
||||
WRITE(p, "o.pos = o.pos + float4("I_DEPTHPARAMS".z, "I_DEPTHPARAMS".w, 0.f, 0.f);\n");
|
||||
}
|
||||
|
||||
WRITE(p, "return o;\n}\n");
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue