diff options
author | Ryan Holtz <rholtz@batcountryentertainment.com> | 2011-05-30 21:10:23 +0000 |
---|---|---|
committer | Ryan Holtz <rholtz@batcountryentertainment.com> | 2011-05-30 21:10:23 +0000 |
commit | 796e691522ba5c47fc0610da4f557514563f85b9 (patch) | |
tree | 961683497fd1e4d7369da812c579572f880b188a /hlsl/deconverge.fx | |
parent | e532e74a8a869af6da71222657f39684210b624e (diff) |
HLSL Updates: [Ryan Holtz, Bat Country Entertainment, austere, SoltanGris42]
- Added the ability to render screenshots at arbitrary resolutions.
- Added the ability to record AVI videos (albeit with no audio) at arbitrary resolutions.
- Added a 43-tap-wide FIR-based NTSC filter with tunable Y, I and Q frequency response.
- Updated scanlines to have a user-tunable pixel-height ratio in addition to the current screen-height ratio.
- Fixed a VRAM leak that was causing many dynamic-resolution drivers to run out of memory mid-run.
Diffstat (limited to 'hlsl/deconverge.fx')
-rw-r--r-- | hlsl/deconverge.fx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/hlsl/deconverge.fx b/hlsl/deconverge.fx index a65f06bbe92..2618fdffad9 100644 --- a/hlsl/deconverge.fx +++ b/hlsl/deconverge.fx @@ -98,6 +98,7 @@ VS_OUTPUT vs_main(VS_INPUT Input) Output.BluCoord.y = ((((TexCoord.y / Ratios.y) - 0.5f)) * (1.0f + BluRadialConvergeY / RawHeight) + 0.5f) * Ratios.y + BluConvergeY * invDims.y; Output.TexCoord = TexCoord; + return Output; } @@ -124,9 +125,13 @@ float4 ps_main(PS_INPUT Input) : COLOR GrnCoord.y = GrnCoord.y - frac(GrnCoord.y); BluCoord.y = BluCoord.y - frac(BluCoord.y); - float RedTexel = tex2D(DiffuseSampler, lerp(TexCoord, RedCoord, Deconverge) / RawDims + 0.5f / RawDims).r; - float GrnTexel = tex2D(DiffuseSampler, lerp(TexCoord, GrnCoord, Deconverge) / RawDims + 0.5f / RawDims).g; - float BluTexel = tex2D(DiffuseSampler, lerp(TexCoord, BluCoord, Deconverge) / RawDims + 0.5f / RawDims).b; + RedCoord = lerp(TexCoord, RedCoord, Deconverge) / RawDims; + GrnCoord = lerp(TexCoord, GrnCoord, Deconverge) / RawDims; + BluCoord = lerp(TexCoord, BluCoord, Deconverge) / RawDims; + + float RedTexel = tex2D(DiffuseSampler, RedCoord + float2(0.0f, 0.5f) / RawDims).r; + float GrnTexel = tex2D(DiffuseSampler, GrnCoord + float2(0.0f, 0.5f) / RawDims).g; + float BluTexel = tex2D(DiffuseSampler, BluCoord + float2(0.0f, 0.5f) / RawDims).b; //RedTexel *= Input.RedCoord.x < (WidthRatio / RawWidth) ? 0.0f : 1.0f; //RedTexel *= Input.RedCoord.y < (HeightRatio / RawHeight) ? 0.0f : 1.0f; |