//
// 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
// {
//
//   float4 g_vParams;                  // Offset:    0 Size:    16 [unused]
//   float4 g_aUVShiftData[64];         // Offset:   16 Size:  1024
//   float4 bones[192];                 // Offset: 1040 Size:  3072
//   
//   struct
//   {
//       
//       float4 vPlane;                 // Offset: 4112
//       float4 vSettings;              // Offset: 4128
//
//   } g_ClipPlane;                     // Offset: 4112 Size:    32
//   float4x4 g_mCloudsShadowsSpace;    // Offset: 4144 Size:    64
//   float4 g_vCloudsShadowDesc;        // Offset: 4208 Size:    16
//   float4 specColor;                  // Offset: 4224 Size:    16 [unused]
//   float4 ControlData;                // Offset: 4240 Size:    16 [unused]
//   float4 difColor;                   // Offset: 4256 Size:    16 [unused]
//   float4 ambient;                    // Offset: 4272 Size:    16 [unused]
//   float4 lightCount;                 // Offset: 4288 Size:    16 [unused]
//   float4 g_avLightPos[4];            // Offset: 4304 Size:    64 [unused]
//   float4 g_avLightColor[4];          // Offset: 4368 Size:    64 [unused]
//   float4 g_avConeDir[4];             // Offset: 4432 Size:    64 [unused]
//   float4 g_vAmbientSettings;         // Offset: 4496 Size:    16
//   
//   struct
//   {
//       
//       float4 vDesc;                  // Offset: 4512
//       float4 vFogLayerPlane;         // Offset: 4528
//       float4 vFogLayerColor;         // Offset: 4544
//       float4 vFogLayerSettings;      // Offset: 4560
//       float4 vFogColor;              // Offset: 4576
//       float4 vFogDistance;           // Offset: 4592
//
//   } g_FogDesc;                       // Offset: 4512 Size:    96 [unused]
//   float4 g_vScreenDepthRect;         // Offset: 4608 Size:    16 [unused]
//   float4x4 g_mViewProj;              // Offset: 4624 Size:    64
//   float4x4 g_mView;                  // Offset: 4688 Size:    64
//   float3 g_vCamPos;                  // Offset: 4752 Size:    12
//   float4 g_vSkyColor;                // Offset: 4768 Size:    16 [unused]
//   float4 g_vFogK;                    // Offset: 4784 Size:    16 [unused]
//   
//   struct
//   {
//       
//       float4x4 mLightSpaceInverse;   // Offset: 4800
//       float4x4 mLightSpace;          // Offset: 4864
//       float4 vShadowBias;            // Offset: 4928
//       float4 vBiasDir;               // Offset: 4944
//       float4 vSmoothOffs;            // Offset: 4960
//       float4 vShadowsDesc;           // Offset: 4976
//       float4 avCPlane[8];            // Offset: 4992
//       float4 avCascadeZ[2];          // Offset: 5120
//       float4 avUVTransform[8];       // Offset: 5152
//       float4 avZTransformZF[8];      // Offset: 5280
//
//   } g_ShadSettings;                  // Offset: 4800 Size:   608
//
// }
//
//
// 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 
// NORMAL                   0   xyz         1     NONE   float   xyz 
// TEXCOORD                 0   xy          2     NONE   float   xy  
// BLENDINDICES             0   x           3     NONE   float   x   
//
//
// 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                 1   xyz         2     NONE   float   xyz 
// TEXCOORD                 2   xyzw        3     NONE   float   xyzw
// TEXCOORD                 3   xyzw        4     NONE   float   xyzw
// TEXCOORD                 4   xyz         5     NONE   float   xyz 
// TEXCOORD                 5   xyz         6     NONE   float   xyz 
// TEXCOORD                 6   xyz         7     NONE   float   xyz 
// TEXCOORD                 7   xyzw        8     NONE   float   xyzw
// SV_ClipDistance          0   x           9  CLIPDST   float   x   
//
vs_4_1
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[312], dynamicIndexed
dcl_input v0.xyz
dcl_input v1.xyz
dcl_input v2.xy
dcl_input v3.x
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_output o2.xyz
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyz
dcl_output o6.xyz
dcl_output o7.xyz
dcl_output o8.xyzw
dcl_output_siv o9.x, clip_distance
// dcl_temps updated : previous = dcl_temps 6
dcl_temps 9
// added 3dmigoto declaration
dcl_resource_texture1d (float,float,float,float) t120
ld_indexable(texture1d)(float,float,float,float) r7.xyzw, l(0, 0, 0, 0), t120.xyzw
mov r8.x, r7.w
mov r8.y, r7.w
mov r8.zw, l(1.0, 1.0)
// end of 3dmigoto declaration
mul r0.x, v3.x, l(3.000000)
ftou r0.x, r0.x
mov r1.xyz, v0.xyzx
mov r1.w, l(1.000000)
dp4 r2.x, r1.xyzw, cb0[r0.x + 65].xyzw
mad r0.yz, v3.xxxx, l(0.000000, 3.000000, 3.000000, 0.000000), l(0.000000, 1.000000, 2.000000, 0.000000)
ftou r0.yz, r0.yyzy
dp4 r2.y, r1.xyzw, cb0[r0.y + 65].xyzw
dp4 r2.z, r1.xyzw, cb0[r0.z + 65].xyzw
mov r2.w, l(1.000000)
// replacing matrix usage :dp4 r1.x, r2.xyzw, cb0[289].xyzw
dp4 r6.x, r2.xyzw, cb0[289].xyzw
mul r1.x, r6.x, r8.x
// replacing matrix usage :dp4 r1.y, r2.xyzw, cb0[290].xyzw
dp4 r6.y, r2.xyzw, cb0[290].xyzw
mul r1.y, r6.y, r8.y
dp4 r3.z, r2.xyzw, cb0[291].xyzw
dp4 r1.w, r2.xyzw, cb0[292].xyzw
lt r0.w, l(0.500000), cb0[258].x
if_nz r0.w
  dp4 o9.x, cb0[257].xyzw, r2.xyzw
else 
  mov o9.x, l(1.000000)
endif 
dp4 o4.x, r2.xyzw, cb0[259].xyzw
dp4 r0.w, r2.xyzw, cb0[260].xyzw
dp4 o4.y, r2.xyzw, cb0[261].xyzw
add r0.w, r0.w, -cb0[263].x
mad_sat o4.z, -r0.w, cb0[263].y, l(1.000000)
add r0.w, r1.w, -cb0[311].x
mul_sat o4.w, r0.w, cb0[311].y
add r4.xyz, -r2.xyzx, cb0[297].xyzx
dp3 r0.w, r4.xyzx, r4.xyzx
rsq r0.w, r0.w
mul o5.xyz, r0.wwww, r4.xyzx
dp4 o3.x, r2.xyzw, cb0[304].xyzw
dp4 o3.y, r2.xyzw, cb0[305].xyzw
dp4 o3.z, r2.xyzw, cb0[306].xyzw
dp3 r4.x, v1.xyzx, cb0[r0.x + 65].xyzx
dp3 r4.y, v1.xyzx, cb0[r0.y + 65].xyzx
dp3 r4.z, v1.xyzx, cb0[r0.z + 65].xyzx
dp3 r0.x, r4.xyzx, r4.xyzx
rsq r0.x, r0.x
mul r0.xyz, r0.xxxx, r4.xyzx
ftou r0.w, v3.x
add r4.xy, v2.xyxx, cb0[r0.w + 1].xyxx
lt r1.z, l(0.500000), cb0[281].y
if_nz r1.z
// replacing matrix usage :  dp3 r5.x, r0.xyzx, cb0[293].xyzx
dp3 r6.x, r0.xyzx, cb0[293].xyzx
mul r5.x, r6.x, r8.x
// replacing matrix usage :  dp3 r5.y, r0.xyzx, cb0[294].xyzx
dp3 r6.y, r0.xyzx, cb0[294].xyzx
mul r5.y, r6.y, r8.y
  dp3 r5.z, r0.xyzx, cb0[295].xyzx
else 
  add r1.z, r1.w, r1.x
  mul r3.x, r1.z, l(0.500000)
  add r1.z, -r1.y, r1.w
  mul r3.y, r1.z, l(0.500000)
  mov r5.xyz, r3.xyzx
endif 
mul o2.xy, r4.xyxx, l(64.000000, 64.000000, 0.000000, 0.000000)
ge r1.z, cb0[r0.w + 1].z, l(0.990000)
if_nz r1.z
  mov o0.xyzw, l(0,0,0,0)
else 
  mov o0.z, r3.z
  mov o0.xyw, r1.xyxw
endif 
mov r5.w, r1.w
mov o3.w, r5.w
mov o8.xyzw, r5.xyzw
mov o2.z, cb0[r0.w + 1].z
mov o6.xyz, r2.xyzx
mov o7.xyz, r0.xyzx
mov o1.xy, r4.xyxx
ret 
// Approximately 70 instruction slots used
