summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl
diff options
context:
space:
mode:
author Ryan Holtz <rholtz@batcountryentertainment.com>2011-05-20 22:18:39 +0000
committer Ryan Holtz <rholtz@batcountryentertainment.com>2011-05-20 22:18:39 +0000
commita0e44c0b00cce3f7e88734da4d7f692de148fd9d (patch)
treec4bd38d33d885cbabaaa207d511ef54322e8f9ca /hlsl
parentf2a42ffe4d36314e2ca1145ff31285a7ce38fee5 (diff)
Fixing a duplicated-texel issue in the HLSL shaders, nw
Diffstat (limited to 'hlsl')
-rw-r--r--hlsl/color.fx2
-rw-r--r--hlsl/post.fx12
2 files changed, 5 insertions, 9 deletions
diff --git a/hlsl/color.fx b/hlsl/color.fx
index a647cbaeff3..50083c048a5 100644
--- a/hlsl/color.fx
+++ b/hlsl/color.fx
@@ -109,7 +109,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 + 0.5f / float2(RawWidth, RawHeight));
float3 OutRGB = BaseTexel.rgb;
diff --git a/hlsl/post.fx b/hlsl/post.fx
index fba984dd01b..e70d00d93ef 100644
--- a/hlsl/post.fx
+++ b/hlsl/post.fx
@@ -80,11 +80,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;
- //float2 InvTexSize = float2(1.0f / TargetWidth, 1.0f / TargetHeight);
- //float2 TexCoord = (Input.Position.xy * InvTexSize) / float2(WidthRatio, HeightRatio);
- float2 Ratios = float2(WidthRatio, HeightRatio);
- float2 Offset = float2(0.5f / RawWidth, 0.5f / RawHeight);
- Output.TexCoord = Input.TexCoord;//(Input.TexCoord - float2(0.5f, 0.5f)) / 8.0f + float2(0.25f, 0.25f);
+ Output.TexCoord = Input.TexCoord;
Output.ExtraInfo = Input.ExtraInfo;
return Output;
@@ -150,11 +146,11 @@ float4 ps_main(PS_INPUT Input) : COLOR
float3 PincushionCurveX = PinUnitCoord.x * PincushionAmount * PincushionR2;
float3 PincushionCurveY = PinUnitCoord.y * PincushionAmount * PincushionR2;
- float4 BaseTexel = tex2D(DiffuseSampler, Input.TexCoord);
+ float4 BaseTexel = tex2D(DiffuseSampler, BaseCoord);
// -- Alpha Clipping (1px border in drawd3d does not work for some reason) --
- clip((ScreenClipCoord.x < 1.0f / TargetWidth) ? -1 : 1);
- clip((ScreenClipCoord.y < 3.0f / TargetHeight) ? -1 : 1);
+ clip((ScreenClipCoord.x < 0.0f / TargetWidth) ? -1 : 1);
+ clip((ScreenClipCoord.y < 0.0f / TargetHeight) ? -1 : 1);
clip((ScreenClipCoord.x > 1.0f / WidthRatio) ? -1 : 1);
clip((ScreenClipCoord.y > 1.0f / HeightRatio) ? -1 : 1);