// ---- 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;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.x = g_DepthTex.Sample(SS_ClampLinear_s, v1.xy).x;
  r0.x = g_vDepthComputeParam.x + -r0.x;
  r0.x = -g_vDepthComputeParam.y / r0.x;
  r0.y = 10 + r0.x;
  o0.z = r0.x / r0.y;
  o0.xyw = float3(0.5,0.5,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 [unused]
//   float4 g_vScreenSize;              // Offset:  112 Size:    16 [unused]
//   float4 g_vIntensity;               // Offset:  128 Size:    16 [unused]
//   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[3], 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 1
sample_indexable(texture2d)(float,float,float,float) r0.x, v1.xyxx, t2.xyzw, s3
add r0.x, -r0.x, cb0[2].x
div r0.x, -cb0[2].y, r0.x
add r0.y, r0.x, l(10.000000)
div o0.z, r0.x, r0.y
mov o0.xyw, l(0.500000,0.500000,0,1.000000)
ret 
// Approximately 7 instruction slots used

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