diff --git a/hlsl/color.fx b/hlsl/color.fx index a980b47614e..6832d8b1d03 100644 --- a/hlsl/color.fx +++ b/hlsl/color.fx @@ -67,7 +67,7 @@ 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; - Output.TexCoord = Input.TexCoord + 0.5f * invDims; + Output.TexCoord = Input.TexCoord + float2(0.5f, 0.5f) * invDims; return Output; } diff --git a/hlsl/deconverge.fx b/hlsl/deconverge.fx index e2e72eb3700..a65f06bbe92 100644 --- a/hlsl/deconverge.fx +++ b/hlsl/deconverge.fx @@ -128,18 +128,18 @@ float4 ps_main(PS_INPUT Input) : COLOR 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; - //RedTexel *= Input.RedCoord.x < (1.0f / TargetWidth) ? 0.0f : 1.0f; - //RedTexel *= Input.RedCoord.y < (1.0f / TargetHeight) ? 0.0f : 1.0f; - //RedTexel *= Input.RedCoord.x > (1.0f / WidthRatio) ? 0.0f : 1.0f; - //RedTexel *= Input.RedCoord.y > (1.0f / HeightRatio) ? 0.0f : 1.0f; - //GrnTexel *= Input.GrnCoord.x < (1.0f / TargetWidth) ? 0.0f : 1.0f; - //GrnTexel *= Input.GrnCoord.y < (1.0f / TargetHeight) ? 0.0f : 1.0f; - //GrnTexel *= Input.GrnCoord.x > (1.0f / WidthRatio) ? 0.0f : 1.0f; - //GrnTexel *= Input.GrnCoord.y > (1.0f / HeightRatio) ? 0.0f : 1.0f; - //BluTexel *= Input.BluCoord.x < (1.0f / TargetWidth) ? 0.0f : 1.0f; - //BluTexel *= Input.BluCoord.y < (1.0f / TargetHeight) ? 0.0f : 1.0f; - //BluTexel *= Input.BluCoord.x > (1.0f / WidthRatio) ? 0.0f : 1.0f; - //BluTexel *= Input.BluCoord.y > (1.0f / HeightRatio) ? 0.0f : 1.0f; + //RedTexel *= Input.RedCoord.x < (WidthRatio / RawWidth) ? 0.0f : 1.0f; + //RedTexel *= Input.RedCoord.y < (HeightRatio / RawHeight) ? 0.0f : 1.0f; + //RedTexel *= Input.RedCoord.x > (1.0f / WidthRatio + 1.0f / RawWidth) ? 0.0f : 1.0f; + //RedTexel *= Input.RedCoord.y > (1.0f / HeightRatio + 1.0f / RawHeight) ? 0.0f : 1.0f; + //GrnTexel *= Input.GrnCoord.x < (WidthRatio / RawWidth) ? 0.0f : 1.0f; + //GrnTexel *= Input.GrnCoord.y < (HeightRatio / RawHeight) ? 0.0f : 1.0f; + //GrnTexel *= Input.GrnCoord.x > (1.0f / WidthRatio + 1.0f / RawWidth) ? 0.0f : 1.0f; + //GrnTexel *= Input.GrnCoord.y > (1.0f / HeightRatio + 1.0f / RawHeight) ? 0.0f : 1.0f; + //BluTexel *= Input.BluCoord.x < (WidthRatio / RawWidth) ? 0.0f : 1.0f; + //BluTexel *= Input.BluCoord.y < (HeightRatio / RawHeight) ? 0.0f : 1.0f; + //BluTexel *= Input.BluCoord.x > (1.0f / WidthRatio + 1.0f / RawWidth) ? 0.0f : 1.0f; + //BluTexel *= Input.BluCoord.y > (1.0f / HeightRatio + 1.0f / RawHeight) ? 0.0f : 1.0f; return float4(RedTexel, GrnTexel, BluTexel, Alpha); } diff --git a/hlsl/phosphor.fx b/hlsl/phosphor.fx index 6512cc4739a..6fa136b9eb2 100644 --- a/hlsl/phosphor.fx +++ b/hlsl/phosphor.fx @@ -78,7 +78,7 @@ VS_OUTPUT vs_main(VS_INPUT Input) Output.Color = Input.Color; float2 InvTexSize = float2(1.0f / TargetWidth, 1.0f / TargetHeight); - Output.TexCoord = Input.TexCoord + 0.5f * InvTexSize; + Output.TexCoord = Input.TexCoord + 0.5f * InvTexSize; Output.PrevCoord = Output.TexCoord + 0.5f * InvTexSize; return Output; 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;