summaryrefslogtreecommitdiffstatshomepage
path: root/hlsl/yiq_decode.fx
diff options
context:
space:
mode:
author Ryan Holtz <rholtz@batcountryentertainment.com>2011-05-22 02:27:31 +0000
committer Ryan Holtz <rholtz@batcountryentertainment.com>2011-05-22 02:27:31 +0000
commit53e20c168ff568f618efa3aa5b1e58e5a8457031 (patch)
treeb2585c3df902817c4d3197c87b3d02b10f0f5fa6 /hlsl/yiq_decode.fx
parent2cd23c14765a433c589a9627ae01080cb1f3a5d8 (diff)
Fixing multiscreen games, nwn
Diffstat (limited to 'hlsl/yiq_decode.fx')
-rw-r--r--hlsl/yiq_decode.fx18
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);
}
//-----------------------------------------------------------------------------