summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl/yiq_encode.fx
diff options
context:
space:
mode:
Diffstat (limited to 'hlsl/yiq_encode.fx')
-rw-r--r--hlsl/yiq_encode.fx20
1 files changed, 11 insertions, 9 deletions
diff --git a/hlsl/yiq_encode.fx b/hlsl/yiq_encode.fx
index 119a9169bf8..c1c0079dd1a 100644
--- a/hlsl/yiq_encode.fx
+++ b/hlsl/yiq_encode.fx
@@ -92,15 +92,17 @@ float4 ps_main(PS_INPUT Input) : COLOR
{
float2 Scaler = float2(RawWidth, RawHeight);
float2 InvRatios = float2(1.0f / WidthRatio, 1.0f / HeightRatio);
- float3 Texel0 = tex2D(DiffuseSampler, Input.Coord0 + float2(PValue * 0.00f + 0.5f, 0.5f) / Scaler).rgb;
- float3 Texel1 = tex2D(DiffuseSampler, Input.Coord1 + float2(PValue * 0.25f + 0.5f, 0.5f) / Scaler).rgb;
- float3 Texel2 = tex2D(DiffuseSampler, Input.Coord2 + float2(PValue * 0.50f + 0.5f, 0.5f) / Scaler).rgb;
- float3 Texel3 = tex2D(DiffuseSampler, Input.Coord3 + float2(PValue * 0.75f + 0.5f, 0.5f) / Scaler).rgb;
-
- float2 Coord0 = (Input.Coord0.xy + float2(0.00f / RawWidth, 0.0f));
- float2 Coord1 = (Input.Coord1.xy + float2(0.25f / RawWidth, 0.0f));
- float2 Coord2 = (Input.Coord2.xy + float2(0.50f / RawWidth, 0.0f));
- float2 Coord3 = (Input.Coord3.xy + float2(0.75f / RawWidth, 0.0f));
+
+ 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 TexelOffset = 0.5f / Scaler;
+ float3 Texel0 = tex2D(DiffuseSampler, Coord0 + TexelOffset).rgb;
+ float3 Texel1 = tex2D(DiffuseSampler, Coord1 + TexelOffset).rgb;
+ float3 Texel2 = tex2D(DiffuseSampler, Coord2 + TexelOffset).rgb;
+ float3 Texel3 = tex2D(DiffuseSampler, Coord3 + TexelOffset).rgb;
float PI = 3.1415926535897932384626433832795;
float W = PI * 2.0f * CCValue * ScanTime;