// ---- Created with 3Dmigoto v1.2.35 on Tue Apr 26 22:31:05 2016

cbuffer Constants : register(b0)
{
  float4 cxadd : packoffset(c0);
  float4 cxmul : packoffset(c1);
}

SamplerState sampler_dsttex_s : register(s0);
SamplerState sampler_srctex_s : register(s1);
Texture2D<float4> dsttex : register(t0);
Texture2D<float4> srctex : register(t1);


// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


void main( 
  float2 v0 : TEXCOORD0,
  float2 w0 : TEXCOORD1,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xyzw = srctex.Sample(sampler_srctex_s, v0.xy).xyzw;
  r0.xyzw = saturate(r0.xyzw * cxmul.xyzw + cxadd.xyzw);
  r1.xyzw = dsttex.Sample(sampler_dsttex_s, w0.xy).xyzw;
  r2.xyz = -r1.xyz + r0.xyz;
  r0.xyz = r1.xyz + -r0.xyz;
  r0.xyz = max(r2.xyz, r0.xyz);
  r2.x = 1 + -r0.w;
  r1.xyz = r2.xxx * r1.xyz;
  o0.w = r2.x * r1.w + r0.w;
  o0.xyz = r0.xyz * r0.www + r1.xyz;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546
//
//
// Buffer Definitions: 
//
// cbuffer Constants
// {
//
//   float4 cxadd;                      // Offset:    0 Size:    16
//   float4 cxmul;                      // Offset:   16 Size:    16
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// sampler_dsttex                    sampler      NA          NA    0        1
// sampler_srctex                    sampler      NA          NA    1        1
// dsttex                            texture  float4          2d    0        1
// srctex                            texture  float4          2d    1        1
// Constants                         cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xy          0     NONE   float   xy  
// TEXCOORD                 1     zw        0     NONE   float     zw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[2], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_input_ps linear v0.xy
dcl_input_ps linear v0.zw
dcl_output o0.xyzw
dcl_temps 3
sample_indexable(texture2d)(float,float,float,float) r0.xyzw, v0.xyxx, t1.xyzw, s1
mad_sat r0.xyzw, r0.xyzw, cb0[1].xyzw, cb0[0].xyzw
sample_indexable(texture2d)(float,float,float,float) r1.xyzw, v0.zwzz, t0.xyzw, s0
add r2.xyz, r0.xyzx, -r1.xyzx
add r0.xyz, -r0.xyzx, r1.xyzx
max r0.xyz, r0.xyzx, r2.xyzx
add r2.x, -r0.w, l(1.000000)
mul r1.xyz, r1.xyzx, r2.xxxx
mad o0.w, r2.x, r1.w, r0.w
mad o0.xyz, r0.xyzx, r0.wwww, r1.xyzx
ret 
// Approximately 11 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
