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

cbuffer cbFilterParam : register(b0)
{
  float4 g_vRandomRatationTexScale : packoffset(c0);
  float4 g_vScreenSpaceTexCoordScale : packoffset(c1);
  float4 g_vDepthComputeParam : packoffset(c2);
  float4x4 g_mCurToPrevScreen : packoffset(c3);
  float4 g_vScreenSize : packoffset(c7);
  float4 g_vIntensity : packoffset(c8);
  float4 g_vblurLength : packoffset(c9);
}

SamplerState SS_ClampLinear_s : register(s3);
Texture2D<float4> g_DepthTex : register(t2);


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


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

  r0.z = g_DepthTex.Sample(SS_ClampLinear_s, v1.xy).x;
  r1.x = g_vDepthComputeParam.x + -r0.z;
  r1.x = -g_vDepthComputeParam.y / r1.x;
  r0.xy = v1.xy;
  r0.w = 1;
  r2.x = dot(r0.xyzw, g_mCurToPrevScreen._m00_m10_m20_m30);
  r2.y = dot(r0.xyzw, g_mCurToPrevScreen._m01_m11_m21_m31);
  r0.x = dot(r0.xyzw, g_mCurToPrevScreen._m03_m13_m23_m33);
  r0.xy = r2.xy / r0.xx;
  r0.xy = v1.xy + -r0.xy;
  r0.xy = g_vIntensity.xy * r0.xy;
  o0.xy = r0.xy * float2(2.5,2.5) + float2(0.5,0.5);
  r0.x = 10 + r1.x;
  o0.z = r1.x / r0.x;
  o0.w = 1;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546
//
//
// Buffer Definitions: 
//
// cbuffer cbFilterParam
// {
//
//   float4 g_vRandomRatationTexScale;  // Offset:    0 Size:    16 [unused]
//   float4 g_vScreenSpaceTexCoordScale;// Offset:   16 Size:    16 [unused]
//   float4 g_vDepthComputeParam;       // Offset:   32 Size:    16
//   float4x4 g_mCurToPrevScreen;       // Offset:   48 Size:    64
//   float4 g_vScreenSize;              // Offset:  112 Size:    16 [unused]
//   float4 g_vIntensity;               // Offset:  128 Size:    16
//   float4 g_vblurLength;              // Offset:  144 Size:    16 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SS_ClampLinear                    sampler      NA          NA    3        1
// g_DepthTex                        texture  float4          2d    2        1
// cbFilterParam                     cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float       
// TEXCOORD                 0   xy          1     NONE   float   xy  
//
//
// 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[9], immediateIndexed
dcl_sampler s3, mode_default
dcl_resource_texture2d (float,float,float,float) t2
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 3
sample_indexable(texture2d)(float,float,float,float) r0.z, v1.xyxx, t2.yzxw, s3
add r1.x, -r0.z, cb0[2].x
div r1.x, -cb0[2].y, r1.x
mov r0.xy, v1.xyxx
mov r0.w, l(1.000000)
dp4 r2.x, r0.xyzw, cb0[3].xyzw
dp4 r2.y, r0.xyzw, cb0[4].xyzw
dp4 r0.x, r0.xyzw, cb0[6].xyzw
div r0.xy, r2.xyxx, r0.xxxx
add r0.xy, -r0.xyxx, v1.xyxx
mul r0.xy, r0.xyxx, cb0[8].xyxx
mad o0.xy, r0.xyxx, l(2.500000, 2.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
add r0.x, r1.x, l(10.000000)
div o0.z, r1.x, r0.x
mov o0.w, l(1.000000)
ret 
// Approximately 16 instruction slots used

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