//
// 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
//   {
//       
//       float4x4 mLightSpaceInverse;   // Offset:    0
//       float4x4 mLightSpace;          // Offset:   64
//       float4 vShadowBias;            // Offset:  128
//       float4 vBiasDir;               // Offset:  144
//       float4 vSmoothOffs;            // Offset:  160
//       float4 vShadowsDesc;           // Offset:  176
//       float4 avCPlane[8];            // Offset:  192
//       float4 avCascadeZ[2];          // Offset:  320
//       float4 avUVTransform[8];       // Offset:  352
//       float4 avZTransformZF[8];      // Offset:  480
//
//   } g_ShadSettings;                  // Offset:    0 Size:   608 [unused]
//   float4x4 g_mCloudsShadowsSpace;    // Offset:  608 Size:    64 [unused]
//   float4 g_vCloudsShadowDesc;        // Offset:  672 Size:    16 [unused]
//   float4 specColor;                  // Offset:  688 Size:    16 [unused]
//   float4 ControlData;                // Offset:  704 Size:    16 [unused]
//   float4 difColor;                   // Offset:  720 Size:    16 [unused]
//   float4 ambient;                    // Offset:  736 Size:    16 [unused]
//   float4 lightCount;                 // Offset:  752 Size:    16 [unused]
//   float4 g_avLightPos[4];            // Offset:  768 Size:    64 [unused]
//   float4 g_avLightColor[4];          // Offset:  832 Size:    64 [unused]
//   float4 g_avConeDir[4];             // Offset:  896 Size:    64 [unused]
//   float4 g_vAmbientSettings;         // Offset:  960 Size:    16 [unused]
//   float4 g_avColorMask[2];           // Offset:  976 Size:    32 [unused]
//   float4 g_vParalaxMaskData;         // Offset: 1008 Size:    16
//   float4 Offset_Time;                // Offset: 1024 Size:    16 [unused]
//   float AlphaDensity;                // Offset: 1040 Size:     4 [unused]
//      = 0x3c75c28f 
//   float4x4 ViewProjection;           // Offset: 1056 Size:    64
//   float4 RenderPos;                  // Offset: 1120 Size:    16
//   float4 g_vWorldPos;                // Offset: 1136 Size:    16
//   float4 GlobalK;                    // Offset: 1152 Size:    16 [unused]
//   float4 g_vGrassSettings;           // Offset: 1168 Size:    16
//      = 0x3f333333 0x3f800000 0x00000000 0x00000000 
//   float4 g_avCapsules[32];           // Offset: 1184 Size:   512 [unused]
//   float4 nc[4];                      // Offset: 1696 Size:    64 [unused]
//   float4 pc;                         // Offset: 1760 Size:    16
//   float4 pcInfo;                     // Offset: 1776 Size:    16
//   float4 TileUV;                     // Offset: 1792 Size:    16
//   float4 TreeShInfo;                 // Offset: 1808 Size:    16 [unused]
//   float4 g_vMaxDistance;             // Offset: 1824 Size:    16 [unused]
//   float4 g_vAsyncTexScale;           // Offset: 1840 Size:    16
//      = 0x3f800000 0x3f800000 0x00000000 0x00000000 
//   float PI;                          // Offset: 1856 Size:     4 [unused]
//      = 0x40490fdb 
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// $Globals                          cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyz         0     NONE   float   xyz 
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy  
// TEXCOORD                 2     zw        1     NONE   float     zw
// TEXCOORD                 1   xyz         2     NONE   float   xyz 
//
vs_4_1
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[116], immediateIndexed
dcl_input v0.xyz
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_output o1.zw
dcl_output o2.xyz
// dcl_temps updated : previous = dcl_temps 4
dcl_temps 7
// added 3dmigoto declaration
dcl_resource_texture1d (float,float,float,float) t120
ld_indexable(texture1d)(float,float,float,float) r5.xyzw, l(0, 0, 0, 0), t120.xyzw
mov r6.x, r5.w
mov r6.y, r5.w
mov r6.zw, l(1.0, 1.0)
// end of 3dmigoto declaration
add r0.xy, v0.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
mul r1.xz, r0.xxyx, cb0[71].wwww
mad r0.zw, r0.xxxy, cb0[71].wwww, cb0[71].xxxz
mad r2.xy, r0.xyxx, cb0[71].wwww, -cb0[111].xzxx
mad r2.xy, cb0[111].wwww, l(0.500000, 0.500000, 0.000000, 0.000000), r2.xyxx
div r2.xy, r2.xyxx, cb0[111].wwww
add r1.w, -r2.x, l(1.000000)
lt r2.z, r1.w, r2.y
if_nz r2.z
  add r2.zw, -cb0[110].wwww, cb0[110].yyyz
  mad r1.w, r1.w, r2.z, cb0[110].w
  add r2.z, -r2.y, l(1.000000)
  mad r1.w, r2.z, r2.w, r1.w
else 
  add r2.zw, -cb0[110].xxxx, cb0[110].zzzy
  mad r2.x, r2.x, r2.z, cb0[110].x
  mad r1.w, r2.y, r2.w, r2.x
endif 
add r1.w, r1.w, -cb0[71].y
mad r1.y, v0.y, cb0[73].w, r1.w
add r1.xyz, r1.xyzx, cb0[70].xyzx
add r2.xy, r1.xzxx, -cb0[63].xyxx
div o2.xy, r2.xyxx, cb0[63].zzzz
dp3 r2.x, r1.xyzx, r1.xyzx
sqrt o2.z, r2.x
mul r2.xyzw, cb0[71].xzxz, l(0.0000781249983, 0.0000781249983, 0.001250, 0.001250)
round_ni r2.xyzw, r2.xyzw
mad_sat r3.xy, r0.zwzz, l(0.0000781249983, 0.0000781249983, 0.000000, 0.000000), -r2.xyxx
add r3.z, -r3.x, l(1.000000)
mad o1.zw, r3.yyyz, cb0[115].xxxy, cb0[115].zzzw
mad r0.zw, -r2.zzzw, l(0.000000, 0.000000, 800.000000, 800.000000), cb0[71].xxxz
mad r0.xy, r0.xyxx, cb0[71].wwww, r0.zwzz
mul r0.x, r0.x, cb0[112].z
mad o1.x, r0.x, l(0.001250), cb0[112].y
mad r0.x, -r0.y, l(0.001250), l(1.000000)
mad o1.y, r0.x, cb0[112].z, cb0[112].x
mov r1.w, l(1.000000)
// replacing matrix usage :dp4 o0.x, r1.xyzw, cb0[66].xyzw
dp4 r4.x, r1.xyzw, cb0[66].xyzw
mul o0.x, r4.x, r6.x
// replacing matrix usage :dp4 o0.y, r1.xyzw, cb0[67].xyzw
dp4 r4.y, r1.xyzw, cb0[67].xyzw
mul o0.y, r4.y, r6.y
dp4 o0.z, r1.xyzw, cb0[68].xyzw
dp4 o0.w, r1.xyzw, cb0[69].xyzw
ret 
// Approximately 42 instruction slots used
