diff options
author | 2011-05-20 22:18:39 +0000 | |
---|---|---|
committer | 2011-05-20 22:18:39 +0000 | |
commit | a0e44c0b00cce3f7e88734da4d7f692de148fd9d (patch) | |
tree | c4bd38d33d885cbabaaa207d511ef54322e8f9ca /hlsl/post.fx | |
parent | f2a42ffe4d36314e2ca1145ff31285a7ce38fee5 (diff) |
Fixing a duplicated-texel issue in the HLSL shaders, nw
Diffstat (limited to 'hlsl/post.fx')
-rw-r--r-- | hlsl/post.fx | 12 |
1 files changed, 4 insertions, 8 deletions
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); |