summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl/deconverge.fx
diff options
context:
space:
mode:
author Ryan Holtz <rholtz@batcountryentertainment.com>2011-05-22 03:48:13 +0000
committer Ryan Holtz <rholtz@batcountryentertainment.com>2011-05-22 03:48:13 +0000
commit41d1d2acdc5d22ad14a9090239976554c4b860b9 (patch)
tree401ae2a62e634b4e15eb424963b3e850cda5acd3 /hlsl/deconverge.fx
parentf38312b078f435955e8d2bc3db1bb508b95ad922 (diff)
TortoiseSVN indicates these didn't get updated, this should finally nail down the texture border pixel stretching issue, nwn
Diffstat (limited to 'hlsl/deconverge.fx')
-rw-r--r--hlsl/deconverge.fx6
1 files changed, 3 insertions, 3 deletions
diff --git a/hlsl/deconverge.fx b/hlsl/deconverge.fx
index 178fbef578e..5b46ca1ddb6 100644
--- a/hlsl/deconverge.fx
+++ b/hlsl/deconverge.fx
@@ -114,9 +114,9 @@ float4 ps_main(PS_INPUT Input) : COLOR
float Deconverge = 1.0f - MagnetDistance / MagnetCenter;
Deconverge = clamp(Deconverge, 0.0f, 1.0f);
float Alpha = tex2D(DiffuseSampler, Input.TexCoord).a;
- float RedTexel = tex2D(DiffuseSampler, lerp(Input.TexCoord, Input.RedCoord, Deconverge)).r;
- float GrnTexel = tex2D(DiffuseSampler, lerp(Input.TexCoord, Input.GrnCoord, Deconverge)).g;
- float BluTexel = tex2D(DiffuseSampler, lerp(Input.TexCoord, Input.BluCoord, Deconverge)).b;
+ float RedTexel = tex2D(DiffuseSampler, lerp(Input.TexCoord, Input.RedCoord, Deconverge) + 0.5f / float2(RawWidth, RawHeight)).r;
+ float GrnTexel = tex2D(DiffuseSampler, lerp(Input.TexCoord, Input.GrnCoord, Deconverge) + 0.5f / float2(RawWidth, RawHeight)).g;
+ float BluTexel = tex2D(DiffuseSampler, lerp(Input.TexCoord, Input.BluCoord, Deconverge) + 0.5f / float2(RawWidth, RawHeight)).b;
return float4(RedTexel, GrnTexel, BluTexel, Alpha);
}