summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorNeoBrainX <NeoBrainX@googlemail.com>2010-12-13 17:49:21 +0000
committerNeoBrainX <NeoBrainX@googlemail.com>2010-12-13 17:49:21 +0000
commit7cf3ef6ddc593dace4f88569cd99d629c1de4222 (patch)
treefff5a4fe7f26b5d11e4fee46608185cd36a99bdb /Source/Core
parent5fd99516499f186c697f0cf2b7a043e215d18b76 (diff)
DX9: Write a detailed description of the vertex position offset magic in drawShadedTexQuad. I hope this makes at least a bit sense to anyone but me, it's better than no documentation at all though.
DX9: Revert to the old EFB coordinate scaling. Glitches caused by higher EFB scales probably can't even be fixed properly in DX9, so let's not even mess with it... git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6573 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoCommon/Src/RenderBase.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/Src/RenderBase.h b/Source/Core/VideoCommon/Src/RenderBase.h
index 9d22073e20..0e8111cafb 100644
--- a/Source/Core/VideoCommon/Src/RenderBase.h
+++ b/Source/Core/VideoCommon/Src/RenderBase.h
@@ -90,12 +90,12 @@ public:
virtual TargetRectangle ConvertEFBRectangle(const EFBRectangle& rc) = 0;
// Use this to upscale native EFB coordinates to IDEAL internal resolution
- static int EFBToScaledX(int x) { return x * (GetTargetWidth()-1) / (EFB_WIDTH-1); }
- static int EFBToScaledY(int y) { return y * (GetTargetHeight()-1) / (EFB_HEIGHT-1); }
+ static int EFBToScaledX(int x) { return x * GetTargetWidth() / EFB_WIDTH; }
+ static int EFBToScaledY(int y) { return y * GetTargetHeight() / EFB_HEIGHT; }
// Floating point versions of the above - only use them if really necessary
- static float EFBToScaledXf(float x) { return x * (float)(GetTargetWidth()-1) / (float)(EFB_WIDTH-1); }
- static float EFBToScaledYf(float y) { return y * (float)(GetTargetHeight()-1) / (float)(EFB_HEIGHT-1); }
+ static float EFBToScaledXf(float x) { return x * (float)GetTargetWidth() / (float)EFB_WIDTH; }
+ static float EFBToScaledYf(float y) { return y * (float)GetTargetHeight() / (float)EFB_HEIGHT; }
// Returns the offset at which the EFB will be drawn onto the backbuffer
// NOTE: Never calculate this manually (e.g. to "increase accuracy"), since you might end up getting off-by-one errors.