//
// 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
//   float4 specColor;                  // Offset: 4144 Size:    16
//   float4 difColor;                   // Offset: 4160 Size:    16 [unused]
//   float4x4 g_mViewProj;              // Offset: 4176 Size:    64
//   float4 g_vCamPos;                  // Offset: 4240 Size:    16
//   float MAX_DISTANCE_SCALE;          // Offset: 4256 Size:     4
//      = 0x435c0000 
//   float4 ExPos[4];                   // Offset: 4272 Size:    64
//   float4 ExRad[4];                   // Offset: 4336 Size:    64 [unused]
//   float4 g_vExVolumeSettings;        // Offset: 4400 Size:    16 [unused]
//   float4 g_vExVolumeRect;            // Offset: 4416 Size:    16
//
// }
//
//
// 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   xyzw        2     NONE   float   xyzw
// COLOR                    0   xyzw        3     NONE   float   xyzw
// SV_ClipDistance          0   x           4  CLIPDST   float   x   
//
vs_4_0
dcl_constantbuffer cb0[277], 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.xyzw
dcl_output o3.xyzw
dcl_output_siv o4.x, clip_distance
// 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
mul r0.x, v3.x, l(3.000000)
ftoi r0.x, r0.x
iadd r0.yz, r0.xxxx, l(0, 1, 2, 0)
mov r1.xyz, v0.xyzx
mov r1.w, l(1.000000)
dp4 r2.x, r1.xyzw, cb0[r0.x + 65].xyzw
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)
dp4 r0.w, r2.xyzw, cb0[263].xyzw
lt r1.x, cb0[266].x, r0.w
if_nz r1.x
  mul r1.xyz, r0.wwww, v0.xyzx
  div r1.xyz, r1.xyzx, cb0[266].xxxx
else 
  mov r1.xyz, v0.xyzx
endif 
mov r1.w, l(1.000000)
dp4 r2.x, r1.xyzw, cb0[r0.x + 65].xyzw
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[261].xyzw
dp4 r4.x, r2.xyzw, cb0[261].xyzw
mul r1.x, r4.x, r6.x
// replacing matrix usage :dp4 r1.y, r2.xyzw, cb0[262].xyzw
dp4 r4.y, r2.xyzw, cb0[262].xyzw
mul r1.y, r4.y, r6.y
dp4 r1.z, r2.xyzw, cb0[263].xyzw
dp4 r1.w, r2.xyzw, cb0[264].xyzw
lt r0.w, l(0.500000), cb0[258].x
if_nz r0.w
  dp4 o4.x, cb0[257].xyzw, r2.xyzw
else 
  mov o4.x, l(1.000000)
endif 
mul r3.xyz, r1.xwyx, l(0.500000, 0.500000, 0.500000, 0.000000)
add r3.x, r3.y, r3.x
mad r3.y, r1.w, l(0.500000), -r3.z
mul r3.zw, r1.wwww, cb0[276].xxxy
mad o2.xy, r3.xyxx, cb0[276].zwzz, r3.zwzz
dp3 r3.x, v1.xyzx, cb0[r0.x + 65].xyzx
dp3 r3.y, v1.xyzx, cb0[r0.y + 65].xyzx
dp3 r3.z, v1.xyzx, cb0[r0.z + 65].xyzx
add r0.xyz, r2.xyzx, -cb0[265].xyzx
dp3 r0.w, r0.xyzx, r0.xyzx
sqrt r2.x, r0.w
dp3 r2.z, r3.xyzx, r3.xyzx
sqrt r2.w, r2.z
lt r2.w, l(0.100000), r2.w
if_nz r2.w
  rsq r2.z, r2.z
  mul r3.xyz, r2.zzzz, r3.xyzx
  rsq r0.w, r0.w
  mul r0.xyz, r0.wwww, r0.xyzx
  dp3 r0.x, r0.xyzx, r3.xyzx
  log r0.x, |r0.x|
  mul r0.x, r0.x, cb0[259].w
  exp r0.xyzw, r0.xxxx
else 
  mov r0.xyzw, l(1.000000,1.000000,1.000000,1.000000)
endif 
add r2.y, r2.y, -cb0[267].y
mad_sat r2.y, -r2.y, cb0[267].x, l(1.000000)
mul r2.x, r2.x, l(0.005000)
min r2.x, r2.x, l(1.000000)
add r2.y, r2.y, l(-1.000000)
mad r2.x, r2.x, r2.y, l(1.000000)
mul o3.xyzw, r0.xyzw, r2.xxxx
ftou r0.x, v3.x
add o1.xy, v2.xyxx, cb0[r0.x + 1].xyxx
mov o0.xyzw, r1.xyzw
mov o2.zw, r1.zzzw
ret 
// Approximately 70 instruction slots used
