diff options
Diffstat (limited to 'hlsl/yiq_decode.fx')
-rw-r--r-- | hlsl/yiq_decode.fx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/hlsl/yiq_decode.fx b/hlsl/yiq_decode.fx index a446698884a..4948250ebf8 100644 --- a/hlsl/yiq_decode.fx +++ b/hlsl/yiq_decode.fx @@ -2,10 +2,23 @@ // YIQ Decode Effect //----------------------------------------------------------------------------- -texture Diffuse; +texture Composite; sampler CompositeSampler = sampler_state { + Texture = <Composite>; + MipFilter = POINT; + MinFilter = POINT; + MagFilter = POINT; + AddressU = CLAMP; + AddressV = CLAMP; + AddressW = CLAMP; +}; + +texture Diffuse; + +sampler DiffuseSampler = sampler_state +{ Texture = <Diffuse>; MipFilter = POINT; MinFilter = POINT; @@ -110,6 +123,7 @@ uniform float BValue; float4 ps_main(PS_INPUT Input) : COLOR { float2 RawDims = float2(RawWidth, RawHeight); + float4 BaseTexel = tex2D(DiffuseSampler, Input.Coord0.xy); float4 OrigC = tex2D(CompositeSampler, Input.Coord0.xy); float4 OrigC2 = tex2D(CompositeSampler, Input.Coord4.xy); float4 C = OrigC; @@ -176,7 +190,7 @@ float4 ps_main(PS_INPUT Input) : COLOR float3 OutRGB = float3(dot(YIQ, float3(1.0f, 0.9563f, 0.6210f)), dot(YIQ, float3(1.0f, -0.2721f, -0.6474f)), dot(YIQ, float3(1.0f, -1.1070f, 1.7046f))); - return float4(OutRGB, 1.0f); + return float4(OutRGB, BaseTexel.a); } //----------------------------------------------------------------------------- |