summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorNeoBrainX <NeoBrainX@googlemail.com>2010-12-11 21:56:04 +0000
committerNeoBrainX <NeoBrainX@googlemail.com>2010-12-11 21:56:04 +0000
commit188aef2f885ad519aa0c9f5d8538c2a3a2fa96ea (patch)
tree3da5d682bb0dbaefca8856efe5586247a9df5c94 /Source
parent5d16185cf95159fcd4f60fad22d1cde40b31a468 (diff)
DX9: Fix drawShadedTexSubQuad vertex positions, this fixes at least Mario's texture in Super Mario Sunshine when EFB->Ram is enabled.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6561 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source')
-rw-r--r--Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.cpp b/Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.cpp
index 9ac2c3b88a..5356041fd3 100644
--- a/Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.cpp
+++ b/Source/Plugins/Plugin_VideoDX9/Src/D3DUtil.cpp
@@ -399,18 +399,16 @@ void drawShadedTexSubQuad(IDirect3DTexture9 *texture,
{
float sw = 1.0f /(float) SourceWidth;
float sh = 1.0f /(float) SourceHeight;
- float dw = 1.0f /(float) DestWidth;
- float dh = 1.0f /(float) DestHeight;
float u1= rSource->left * sw;
float u2= rSource->right * sw;
float v1= rSource->top * sh;
float v2= rSource->bottom * sh;
struct Q2DVertex { float x,y,z,rhw,u,v,w,h,L,T,R,B; } coords[4] = {
- { rDest->left - dw , rDest->top + dh, 1.0f,1.0f, u1, v2, sw, sh,u1,v1,u2,v2},
- { rDest->left - dw , rDest->bottom + dh, 1.0f,1.0f, u1, v1, sw, sh,u1,v1,u2,v2},
- { rDest->right - dw , rDest->top + dh, 1.0f,1.0f, u2, v2, sw, sh,u1,v1,u2,v2},
- { rDest->right - dw , rDest->bottom + dh, 1.0f,1.0f, u2, v1, sw, sh,u1,v1,u2,v2}
+ { rDest->left - 0.5f, rDest->top - 0.5f, 1.0f,1.0f, u1, v2, sw, sh,u1,v1,u2,v2},
+ { rDest->left - 0.5f, rDest->bottom - 0.5f, 1.0f,1.0f, u1, v1, sw, sh,u1,v1,u2,v2},
+ { rDest->right - 0.5f, rDest->top - 0.5f, 1.0f,1.0f, u2, v2, sw, sh,u1,v1,u2,v2},
+ { rDest->right - 0.5f, rDest->bottom - 0.5f, 1.0f,1.0f, u2, v1, sw, sh,u1,v1,u2,v2}
};
dev->SetVertexShader(Vshader);
dev->SetPixelShader(PShader);