From 771b77142fe1ac7e7ced80234de8e0579b881e3d Mon Sep 17 00:00:00 2001 From: Ryan Holtz Date: Fri, 3 Jun 2011 14:38:59 +0000 Subject: Fix for performance regression and slider regression in HLSL, also re-enabling pixel prescaling in yiq_encode.fx. No whatsnew. --- hlsl/yiq_decode.fx | 4 ++-- hlsl/yiq_encode.fx | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'hlsl') diff --git a/hlsl/yiq_decode.fx b/hlsl/yiq_decode.fx index c25d9d5405c..61ba590717a 100644 --- a/hlsl/yiq_decode.fx +++ b/hlsl/yiq_decode.fx @@ -74,7 +74,7 @@ VS_OUTPUT vs_main(VS_INPUT Input) Output.Position.x -= 0.5f; Output.Position.y -= 0.5f; Output.Position *= float4(2.0f, 2.0f, 1.0f, 1.0f); - Output.Coord0.xy = Input.TexCoord + 0.5f / float2(RawWidth, RawHeight); + Output.Coord0.xy = Input.TexCoord; Output.Coord0.zw = float2(1.0f / RawWidth, 0.0f); return Output; @@ -122,7 +122,7 @@ float4 ps_main(PS_INPUT Input) : COLOR float4 CoordX = Input.Coord0.x + Input.Coord0.z * n4 * 0.25f; float4 CoordY = Input.Coord0.y; float2 TexCoord = float2(CoordX.r, CoordY.r); - float4 C = tex2D(CompositeSampler, TexCoord + float2(0.125f, 0.0f) / RawDims) * CRange + MinC; + float4 C = tex2D(CompositeSampler, TexCoord + float2(0.625f, 0.4f) / RawDims) * CRange + MinC; float4 WT = W * (CoordX * WidthRatio + AValue * CoordY * 2.0f * (RawHeight / HeightRatio) + BValue) + OValue; float4 SincYIn = PI2 * Fc_y * n4; diff --git a/hlsl/yiq_encode.fx b/hlsl/yiq_encode.fx index c1c0079dd1a..d9c888d5a3c 100644 --- a/hlsl/yiq_encode.fx +++ b/hlsl/yiq_encode.fx @@ -93,10 +93,10 @@ float4 ps_main(PS_INPUT Input) : COLOR float2 Scaler = float2(RawWidth, RawHeight); float2 InvRatios = float2(1.0f / WidthRatio, 1.0f / HeightRatio); - float2 Coord0 = Input.Coord0 + float2(0.00f, 0.0f) / Scaler; - float2 Coord1 = Input.Coord1 + float2(0.25f, 0.0f) / Scaler; - float2 Coord2 = Input.Coord2 + float2(0.50f, 0.0f) / Scaler; - float2 Coord3 = Input.Coord3 + float2(0.75f, 0.0f) / Scaler; + float2 Coord0 = Input.Coord0 + float2(PValue * 0.00f, 0.0f) / Scaler; + float2 Coord1 = Input.Coord1 + float2(PValue * 0.25f, 0.0f) / Scaler; + float2 Coord2 = Input.Coord2 + float2(PValue * 0.50f, 0.0f) / Scaler; + float2 Coord3 = Input.Coord3 + float2(PValue * 0.75f, 0.0f) / Scaler; float2 TexelOffset = 0.5f / Scaler; float3 Texel0 = tex2D(DiffuseSampler, Coord0 + TexelOffset).rgb; -- cgit v1.2.3