//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.2.67 on Mon Jan 01 13:11:45 2018
//
//
// Buffer Definitions: 
//
// cbuffer $Globals
// {
//
//   struct
//   {
//       
//       float4 vPlane;                 // Offset:    0
//       float4 vSettings;              // Offset:   16
//
//   } g_ClipPlane;                     // Offset:    0 Size:    32 [unused]
//   
//   struct
//   {
//       
//       float4x4 mLightSpaceInverse;   // Offset:   32
//       float4x4 mLightSpace;          // Offset:   96
//       float4 vShadowBias;            // Offset:  160
//       float4 vBiasDir;               // Offset:  176
//       float4 vSmoothOffs;            // Offset:  192
//       float4 vShadowsDesc;           // Offset:  208
//       float4 avCPlane[8];            // Offset:  224
//       float4 avCascadeZ[2];          // Offset:  352
//       float4 avUVTransform[8];       // Offset:  384
//       float4 avZTransformZF[8];      // Offset:  512
//
//   } g_ShadSettings;                  // Offset:   32 Size:   608 [unused]
//   float4x4 g_mCloudsShadowsSpace;    // Offset:  640 Size:    64 [unused]
//   float4 g_vCloudsShadowDesc;        // Offset:  704 Size:    16 [unused]
//   float4 g_vKSettings;               // Offset:  720 Size:    16
//   float4x4 g_mPrevObjViewProj;       // Offset:  736 Size:    64
//   float4 g_vAmbientColor;            // Offset:  800 Size:    16 [unused]
//   float4 specColor;                  // Offset:  816 Size:    16 [unused]
//   float4 ControlData;                // Offset:  832 Size:    16 [unused]
//   float4 difColor;                   // Offset:  848 Size:    16 [unused]
//   float4 ambient;                    // Offset:  864 Size:    16 [unused]
//   float4 g_vDefLightDir;             // Offset:  880 Size:    16 [unused]
//   float4 g_vDefLightColor;           // Offset:  896 Size:    16 [unused]
//   float4 g_vDefSpecColor;            // Offset:  912 Size:    16 [unused]
//   uint CS_FRONT;                     // Offset:  928 Size:     4 [unused]
//      = 0x00000000 
//   uint CS_RIGHT;                     // Offset:  932 Size:     4 [unused]
//      = 0x00000001 
//   uint CS_BACK;                      // Offset:  936 Size:     4 [unused]
//      = 0x00000002 
//   uint CS_LEFT;                      // Offset:  940 Size:     4 [unused]
//      = 0x00000003 
//   uint CS_TOP;                       // Offset:  944 Size:     4 [unused]
//      = 0x00000004 
//   uint CS_BOTTOM;                    // Offset:  948 Size:     4 [unused]
//      = 0x00000005 
//   float4 g_vAmbientSettings;         // Offset:  960 Size:    16 [unused]
//   float4 g_vScreenDepthRect;         // Offset:  976 Size:    16 [unused]
//   
//   struct
//   {
//       
//       float4 vDesc;                  // Offset:  992
//       float4 vFogLayerPlane;         // Offset: 1008
//       float4 vFogLayerColor;         // Offset: 1024
//       float4 vFogLayerSettings;      // Offset: 1040
//       float4 vFogColor;              // Offset: 1056
//       float4 vFogDistance;           // Offset: 1072
//
//   } g_FogDesc;                       // Offset:  992 Size:    96 [unused]
//   float4 g_vVisibility;              // Offset: 1088 Size:    16 [unused]
//      = 0x44480000 0x42c80000 0x3f800000 0x00000000 
//   float4x4 g_mViewProj;              // Offset: 1104 Size:    64
//   float4x4 g_mView;                  // Offset: 1168 Size:    64 [unused]
//   float4 g_vCamPos;                  // Offset: 1232 Size:    16 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// mySampler                         sampler      NA          NA    0        1
// mySampler                         texture  float4          2d    0        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   xyz         1     NONE   float   xy  
// TEXCOORD                 1   xyz         2     NONE   float   xyz 
// TEXCOORD                 2   xyz         3     NONE   float       
// TEXCOORD                 3   xyzw        4     NONE   float       
// TEXCOORD                 4   xyzw        5     NONE   float       
// TEXCOORD                 5   xy          6     NONE   float       
// TEXCOORD                 6   xyzw        7     NONE   float       
// COLOR                    0   xyzw        8     NONE   float      w
// TEXCOORD                 7   xyzw        9     NONE   float   xyzw
// TEXCOORD                 8   xyz        10     NONE   float       
// SV_ClipDistance          0   x          11  CLIPDST   float       
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
// SV_Target                1   xyzw        1   TARGET   float   xyzw
// SV_Target                2   xyzw        2   TARGET   float   xyzw
//
ps_4_1
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[73], immediateIndexed
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_input_ps linear v2.xyz
dcl_input_ps linear v8.w
dcl_input_ps linear v9.xyzw
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_temps 4
sample r0.x, v1.xyxx, t0.wxyz, s0
lt r0.y, r0.x, l(0.125000)
if_nz r0.y
  discard_nz l(-1)
endif 
dp3 r0.y, v9.xyzx, v9.xyzx
rsq r0.y, r0.y
mul r0.yzw, r0.yyyy, v9.xxyz
mad o0.xyz, r0.yzwy, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
add r0.x, r0.x, r0.x
min r0.x, r0.x, l(1.000000)
mul r0.x, r0.x, v8.w
mul o0.w, r0.x, l(0.500000)
lt r0.x, cb0[45].x, l(0.500000)
if_nz r0.x
  mov r0.xy, l(0,0,0,0)
else 
  mov r1.xyz, v2.xyzx
  mov r1.w, l(1.000000)
  dp4 r2.x, r1.xyzw, cb0[69].xyzw
  dp4 r2.y, r1.xyzw, cb0[70].xyzw
  dp4 r0.w, r1.xyzw, cb0[72].xyzw
  div r2.xy, r2.xyxx, r0.wwww
  dp4 r3.x, r1.xyzw, cb0[46].xyzw
  dp4 r3.y, r1.xyzw, cb0[47].xyzw
  dp4 r0.w, r1.xyzw, cb0[49].xyzw
  div r1.xy, r3.xyxx, r0.wwww
  add r0.xz, -r1.xxyx, r2.xxyx
  mul r0.y, -r0.z, cb0[45].y
  dp2 r0.z, r0.xyxx, r0.xyxx
  sqrt r0.z, r0.z
  lt r0.w, l(2.000000), r0.z
  if_nz r0.w
    div r0.z, l(2.000000), r0.z
    mul r0.xy, r0.zzzz, r0.xyxx
  endif 
endif 
mov o1.x, v9.w
mov o1.yzw, l(0,0,0,0)
mov o2.xy, r0.xyxx
mov o2.zw, l(0,0,0,0)
ret 
// Approximately 42 instruction slots used
