diff options
author | 2011-05-20 07:37:34 +0000 | |
---|---|---|
committer | 2011-05-20 07:37:34 +0000 | |
commit | fd7a110eba491ceaae928908d9c19b326701e314 (patch) | |
tree | 8d61c2d39985517de10825aa821a1f294f11c26e /hlsl/post.fx | |
parent | 3126517ab3fead63e505918adbdb7323c0ed5fac (diff) |
HLSL Updates [Ryan Holtz, Bat Country Entertainment]
- Re-worked render target handling to align pixels better, reducing unintentional blurring
- Made major fixes to CVBS simulation, significantly increasing color saturation
Diffstat (limited to 'hlsl/post.fx')
-rw-r--r-- | hlsl/post.fx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/hlsl/post.fx b/hlsl/post.fx index fa2082e6591..fba984dd01b 100644 --- a/hlsl/post.fx +++ b/hlsl/post.fx @@ -80,9 +80,11 @@ 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); - Output.TexCoord = TexCoord;//(Input.TexCoord - float2(0.5f, 0.5f)) / 8.0f + float2(0.25f, 0.25f); + //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.ExtraInfo = Input.ExtraInfo; return Output; @@ -148,7 +150,7 @@ float4 ps_main(PS_INPUT Input) : COLOR float3 PincushionCurveX = PinUnitCoord.x * PincushionAmount * PincushionR2; float3 PincushionCurveY = PinUnitCoord.y * PincushionAmount * PincushionR2; - float4 BaseTexel = tex2D(DiffuseSampler, BaseCoord * Ratios); + float4 BaseTexel = tex2D(DiffuseSampler, Input.TexCoord); // -- Alpha Clipping (1px border in drawd3d does not work for some reason) -- clip((ScreenClipCoord.x < 1.0f / TargetWidth) ? -1 : 1); |