summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl/focus.fx
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2015-09-26 18:22:51 +0200
committer ImJezze <jezze@gmx.net>2015-09-26 18:22:51 +0200
commit062e6e0383050546656dfed7261273a2d7d142a4 (patch)
treeb28fdb238ce5501908086d41f0e443cf11e6c313 /hlsl/focus.fx
parent37f6ff0b653f840010a9b2dd18b5df9e6337aa2c (diff)
Refactoring, Fixes and Cleanup
- added distortion pass, which is applied after the bloom pass - moved vignetting, curvature, round corners and reflection effect to distortion pass - disabled distortion pass for multi screens and activated artworks due to not yet fixed misalignments - disabled scanlines for vector rendering in post pass shader - removed prescale knowledge from downsample, bloom and post pass shader - fixed half pixel offset in most shaders - fixed position of reflection effect when screen is rotated or flipped - fixed roundness of round corners in any aspect ratio - fixed shadow mask bleeding (nearly completly) - added bounds() and screen_bounds() getter to layout_view - added current_view() getter to render_target - some cleanup and refactoring
Diffstat (limited to 'hlsl/focus.fx')
-rw-r--r--hlsl/focus.fx7
1 files changed, 4 insertions, 3 deletions
diff --git a/hlsl/focus.fx b/hlsl/focus.fx
index b71bc0dcdc6..39e642b58c4 100644
--- a/hlsl/focus.fx
+++ b/hlsl/focus.fx
@@ -83,8 +83,9 @@ VS_OUTPUT vs_main(VS_INPUT Input)
Output.Position.y = 1.0f - Output.Position.y; // flip y
Output.Position.xy -= 0.5f; // center
Output.Position.xy *= 2.0f; // zoom
-
- float2 TexCoord = Input.TexCoord + 0.5f / TargetDims;
+
+ float2 TexCoord = Input.TexCoord;
+ TexCoord += 0.5f / TargetDims; // half texel offset correction (DX9)
Output.TexCoord0 = TexCoord;
Output.TexCoord1 = TexCoord + Coord1Offset * TargetTexelDims * Defocus;
@@ -117,7 +118,7 @@ float4 ps_main(PS_INPUT Input) : COLOR
float3 blurred = (d0.rgb + d1 + d2 + d3 + d4 + d5 + d6 + d7) / 8.0f;
blurred = lerp(d0.rgb, blurred, 1.0f);
-
+
return float4(blurred, d0.a);
}