//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.2.67 on Mon Jan 01 13:11:46 2018
//
//
// Buffer Definitions: 
//
// cbuffer $Globals
// {
//
//   struct
//   {
//       
//       float4 vPlane;                 // Offset:    0
//       float4 vSettings;              // Offset:   16
//
//   } g_ClipPlane;                     // Offset:    0 Size:    32 [unused]
//   float4 specColor;                  // Offset:   32 Size:    16 [unused]
//   float4 ControlData;                // Offset:   48 Size:    16 [unused]
//   float4 difColor;                   // Offset:   64 Size:    16 [unused]
//   float4 ambient;                    // Offset:   80 Size:    16 [unused]
//   float4 lightCount;                 // Offset:   96 Size:    16 [unused]
//   float4 g_avLightPos[4];            // Offset:  112 Size:    64 [unused]
//   float4 g_avLightColor[4];          // Offset:  176 Size:    64 [unused]
//   float4 g_avConeDir[4];             // Offset:  240 Size:    64 [unused]
//   float4 g_vAmbientSettings;         // Offset:  304 Size:    16 [unused]
//   float4 g_vScreenDepthRect;         // Offset:  320 Size:    16 [unused]
//   float4x4 g_mViewProj;              // Offset:  336 Size:    64 [unused]
//   float4x4 g_mIView;                 // Offset:  400 Size:    64 [unused]
//   float4x4 g_mWM;                    // Offset:  464 Size:    64 [unused]
//   float4x4 g_mView;                  // Offset:  528 Size:    64 [unused]
//   float4 g_vCamPos;                  // Offset:  592 Size:    16 [unused]
//   float4 g_vDistortionDesc;          // Offset:  608 Size:    16
//   float4 g_avPData[150];             // Offset:  624 Size:  2400 [unused]
//   
//   struct
//   {
//       
//       float4 vDesc;                  // Offset: 3024
//       float4 vFogLayerPlane;         // Offset: 3040
//       float4 vFogLayerColor;         // Offset: 3056
//       float4 vFogLayerSettings;      // Offset: 3072
//       float4 vFogColor;              // Offset: 3088
//       float4 vFogDistance;           // Offset: 3104
//
//   } g_FogDesc;                       // Offset: 3024 Size:    96 [unused]
//   float4 ExPos[4];                   // Offset: 3120 Size:    64 [unused]
//   float4 ExRad[4];                   // Offset: 3184 Size:    64 [unused]
//   float4 g_vExVolumeSettings;        // Offset: 3248 Size:    16
//   float4 g_vExVolumeRect;            // Offset: 3264 Size:    16 [unused]
//   float4 GrayK;                      // Offset: 3280 Size:    16
//      = 0x3eaa7efa 0x3eaa7efa 0x3eaa7efa 0x00000000 
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// VolumeDepthSampler                sampler      NA          NA    0        1
// VolumeAlphaSampler                sampler      NA          NA    1        1
// DepthSampler                      sampler      NA          NA    2        1
// mySampler                         sampler      NA          NA    3        1
// mySampler                         texture  float4          2d    0        1
// DepthSampler                      texture  float4          2d    1        1
// VolumeDepthSampler                texture  float4          2d    2        1
// VolumeAlphaSampler                texture  float4          2d    3        1
// $Globals                          cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float       
// TEXCOORD                 0   xyzw        1     NONE   float   xy  
// TEXCOORD                 1   xyzw        2     NONE   float   xyzw
// TEXCOORD                 2   xyzw        3     NONE   float      w
// TEXCOORD                 3   xyzw        4     NONE   float   xyzw
// TEXCOORD                 4   xy          5     NONE   float   xy  
// TEXCOORD                 5     zw        5     NONE   float       
// COLOR                    0   xyzw        6     NONE   float       
// COLOR                    1   xyzw        7     NONE   float       
// COLOR                    2   xyzw        8     NONE   float       
// COLOR                    3   xyzw        9     NONE   float       
// SV_ClipDistance          0   x          10  CLIPDST   float       
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_4_0
dcl_constantbuffer cb0[206], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_input_ps linear v1.xy
dcl_input_ps linear v2.xyzw
dcl_input_ps linear v3.w
dcl_input_ps linear v4.xyzw
dcl_input_ps linear v5.xy
dcl_output o0.xyzw
dcl_temps 4
sample r0.xyzw, v1.xyxx, t0.xyzw, s3
mul r0.xyzw, r0.wwww, r0.xyzw
mul r0.xyzw, r0.xyzw, v3.wwww
dp3 r1.x, v2.xyzx, cb0[205].xyzx
max r1.x, r1.x, |v2.w|
add r1.x, -r1.x, l(1.000000)
mul r1.y, r1.x, r1.x
mul r1.x, r1.y, r1.x
mul r0.xyzw, r0.xyzw, r1.xxxx
dp3 r1.x, r0.xyzx, r0.xyzx
sqrt r1.x, r1.x
lt r1.x, l(0.001000), r1.x
if_nz r1.x
  lt r1.x, l(0.500000), cb0[38].z
  if_nz r1.x
    sample r1.xyzw, v4.xyxx, t1.yxzw, s2
    lt r1.z, r1.y, l(40000.000000)
    if_nz r1.z
      add r1.y, r1.y, -v4.z
      mul_sat r1.y, r1.y, v4.w
    else 
      mov r1.y, l(1.000000)
    endif 
    mov_sat r1.x, r1.x
    add r1.z, -r1.y, l(1.000000)
    mad r1.x, r1.x, r1.z, r1.y
  else 
    mov r1.x, l(1.000000)
  endif 
  mul r0.xyzw, r0.xyzw, r1.xxxx
endif 
div r1.x, l(2.000000), v4.w
sample r2.xyzw, v5.xyxx, t2.xyzw, s0
sample r3.xyzw, v5.xyxx, t3.xyzw, s1
max r1.x, r1.x, cb0[203].x
mad r1.y, -r1.x, l(0.500000), r2.x
mul r1.z, r3.w, r3.w
add r1.y, -r1.y, v4.z
div_sat r1.x, r1.y, r1.x
mad r1.x, -r1.x, r1.z, l(1.000000)
mul o0.xyzw, r0.xyzw, r1.xxxx
ret 
// Approximately 42 instruction slots used
