From a2c7b61daa5d66e0e9d7b1d1f683cf2f6d9f5973 Mon Sep 17 00:00:00 2001 From: ImJezze Date: Thu, 31 Dec 2015 16:59:23 +0100 Subject: Refactoring - replaced shader parameters OrientationSwapXY xor RotationSwapXY by SwapXY - made shader parameters SourceDims, SourceRect, TargetDims, ScreenDims, QuadDims and SwapXY available for all shaders - color convolution, defocus and phosphor pass will now be skipped if all influencing parameters are 0 - removed unused bloom_texture and bloom_target arrays from cache_target class - fixed half texel offset in prescale.fx --- hlsl/prescale.fx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'hlsl/prescale.fx') diff --git a/hlsl/prescale.fx b/hlsl/prescale.fx index 33b2a4efb06..846c02577ce 100644 --- a/hlsl/prescale.fx +++ b/hlsl/prescale.fx @@ -49,6 +49,7 @@ struct PS_INPUT //----------------------------------------------------------------------------- uniform float2 ScreenDims; +uniform float2 TargetDims; VS_OUTPUT vs_main(VS_INPUT Input) { @@ -56,11 +57,12 @@ VS_OUTPUT vs_main(VS_INPUT Input) Output.Position = float4(Input.Position.xyz, 1.0f); Output.Position.xy /= ScreenDims; - Output.Position.y = 1.0f - Output.Position.y; - Output.Position.xy -= 0.5f; - Output.Position *= float4(2.0f, 2.0f, 1.0f, 1.0f); + Output.Position.y = 1.0f - Output.Position.y; // flip y + Output.Position.xy -= 0.5f; // center + Output.Position.xy *= 2.0f; // zoom - Output.TexCoord = Input.TexCoord + 0.5f / ScreenDims; + Output.TexCoord = Input.TexCoord; + Output.TexCoord += 0.5f / TargetDims; // half texel offset correction (DX9) return Output; } -- cgit v1.2.3