summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl/color.fx
diff options
context:
space:
mode:
author Ryan Holtz <rholtz@batcountryentertainment.com>2011-05-28 00:49:22 +0000
committer Ryan Holtz <rholtz@batcountryentertainment.com>2011-05-28 00:49:22 +0000
commit59d38593e8d317236af9702cb1607abdbef0cad8 (patch)
tree3e06d38576387894bf4c2dd50a3d5b4839b976da /hlsl/color.fx
parent3e437e09f04166aac3b9e6aa60ae4ea7865cccda (diff)
MAMETesters bugs fixed:
- 04361: all: When using HLSL screen size not correct nwn: Frickin' finally...
Diffstat (limited to 'hlsl/color.fx')
-rw-r--r--hlsl/color.fx5
1 files changed, 3 insertions, 2 deletions
diff --git a/hlsl/color.fx b/hlsl/color.fx
index e04d93daabd..a980b47614e 100644
--- a/hlsl/color.fx
+++ b/hlsl/color.fx
@@ -58,6 +58,7 @@ VS_OUTPUT vs_main(VS_INPUT Input)
{
VS_OUTPUT Output = (VS_OUTPUT)0;
+ float2 invDims = float2(1.0f / RawWidth, 1.0f / RawHeight);
Output.Position = float4(Input.Position.xyz, 1.0f);
Output.Position.x /= TargetWidth;
Output.Position.y /= TargetHeight;
@@ -66,7 +67,7 @@ VS_OUTPUT vs_main(VS_INPUT Input)
Output.Position.y -= 0.5f;
Output.Position *= float4(2.0f, 2.0f, 1.0f, 1.0f);
Output.Color = Input.Color;
- Output.TexCoord = Input.TexCoord;
+ Output.TexCoord = Input.TexCoord + 0.5f * invDims;
return Output;
}
@@ -105,7 +106,7 @@ uniform float BluPower = 2.2f;
float4 ps_main(PS_INPUT Input) : COLOR
{
- float4 BaseTexel = tex2D(DiffuseSampler, Input.TexCoord + 0.5f / float2(-RawWidth, -RawHeight));
+ float4 BaseTexel = tex2D(DiffuseSampler, Input.TexCoord);
float3 OutRGB = BaseTexel.rgb;