diff options
author | 2011-05-28 14:14:05 +0000 | |
---|---|---|
committer | 2011-05-28 14:14:05 +0000 | |
commit | 244eb4cf248f642c4ab572af923c4b902ebc7ebf (patch) | |
tree | dfcf6ce1dc13d6012bee0cef7708b45563986539 /hlsl/post.fx | |
parent | 75f1480ae9499ba59f9f1ac9d2bbdf77230591f8 (diff) |
No whatnsew: Really, really, really fixed the remaining pixel alignment and UV clamping issues. Tested Gradius, Pac-Man, Mr. Do, and Stompin' with no observed issues. Gradius, in particular, is a good test case as the bottom row of its "Credits" readout lies on the bottom row of pixels, and the scrolling starfield allows visual verification of the X extents as they scroll on and off.
Diffstat (limited to 'hlsl/post.fx')
-rw-r--r-- | hlsl/post.fx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/hlsl/post.fx b/hlsl/post.fx index a02c3c6e97b..ff1cbfa1f47 100644 --- a/hlsl/post.fx +++ b/hlsl/post.fx @@ -148,13 +148,13 @@ float4 ps_main(PS_INPUT Input) : COLOR float4 BaseTexel = tex2D(DiffuseSampler, BaseCoord); // -- Alpha Clipping (1px border in drawd3d does not work for some reason) -- - clip((BaseCoord.x < WidthRatio / RawWidth) ? -1 : 1); - clip((BaseCoord.y < HeightRatio / RawHeight) ? -1 : 1); - clip((BaseCoord.x > (1.0f / WidthRatio + 1.0f / RawWidth + 1.0f / TargetWidth)) ? -1 : 1); - clip((BaseCoord.y > (1.0f / HeightRatio + 1.0f / RawHeight + 1.0f / TargetHeight)) ? -1 : 1); + clip((BaseCoord.x < 1.0f / RawWidth) ? -1 : 1); + clip((BaseCoord.y < 1.0f / RawHeight) ? -1 : 1); + clip((BaseCoord.x > (1.0f / WidthRatio + 1.0f / RawWidth)) ? -1 : 1); + clip((BaseCoord.y > (1.0f / HeightRatio + 1.0f / RawHeight)) ? -1 : 1); // -- Scanline Simulation -- - float InnerSine = BaseCoord.y * RawHeight * ScanlineScale + 0.5f; + float InnerSine = BaseCoord.y * RawHeight * ScanlineScale; float3 ScanBrightness = lerp(1.0f, abs(sin(InnerSine * PI + ScanlineOffset * RawHeight)) * ScanlineBrightScale + 1.0f, ScanlineAmount); //float3 Scanned = BaseTexel.rgb * ScanBrightness; float3 Scanned = BaseTexel.rgb * ScanBrightness; |