//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.2.43 on Tue Oct 18 13:26:27 2016
//
//
// Buffer Definitions: 
//
// cbuffer FrameConstants
// {
//
//   float4x4 g_xView;                  // Offset:    0 Size:    64 [unused]
//   float4x4 g_xProj;                  // Offset:   64 Size:    64 [unused]
//   float4x4 g_xViewProj;              // Offset:  128 Size:    64 [unused]
//   float4x4 g_xInvView;               // Offset:  192 Size:    64 [unused]
//   float4x4 g_xInvProj;               // Offset:  256 Size:    64 [unused]
//   float4x4 g_xInvViewProj;           // Offset:  320 Size:    64 [unused]
//   float3 g_xCamPos;                  // Offset:  384 Size:    12
//   float2 g_xRcpScreenDims;           // Offset:  400 Size:     8 [unused]
//   float2 g_xDepthProjViewUnpack;     // Offset:  408 Size:     8 [unused]
//   float4 g_axViewFrustumPlanes[6];   // Offset:  416 Size:    96 [unused]
//
// }
//
// cbuffer PrimitiveConstants
// {
//
//   float4 g_xRedSH;                   // Offset:    0 Size:    16 [unused]
//   float4 g_xGreenSH;                 // Offset:   16 Size:    16 [unused]
//   float4 g_xBlueSH;                  // Offset:   32 Size:    16 [unused]
//   float4 g_xSelfIlluminationParameters;// Offset:   48 Size:    16 [unused]
//   float3 g_xAlbedoModifier;          // Offset:   64 Size:    12 [unused]
//   float g_fFogColourMult;            // Offset:   76 Size:     4 [unused]
//   float4 g_xUV_Offsets;              // Offset:   80 Size:    16
//
// }
//
// cbuffer SkinConstants
// {
//
//   float4x4 g_xWorld;                 // Offset:    0 Size:    64
//   float4x4 g_xWorldViewProj;         // Offset:   64 Size:    64
//   float4 g_xShadowFrustum;           // Offset:  128 Size:    16 [unused]
//   float4 g_xLightPos;                // Offset:  144 Size:    16 [unused]
//   row_major float3x4 g_axBoneMatrices[128];// Offset:  160 Size:  6144
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// FrameConstants                    cbuffer      NA          NA    0        1
// PrimitiveConstants                cbuffer      NA          NA    3        1
// SkinConstants                     cbuffer      NA          NA    5        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// BLENDINDICES             0   xyzw        1     NONE    uint   xyzw
// BLENDWEIGHT              0   xyzw        2     NONE   float   xyzw
// TANGENT                  0   xyz         3     NONE   float   xyz 
// BINORMAL                 0   xyz         4     NONE   float   xyz 
// NORMAL                   0   xyz         5     NONE   float   xyz 
// TEXCOORD                 0   xyzw        6     NONE   float   xyzw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// TANGENT                  0   xyz         1     NONE   float   xyz 
// BINORMAL                 0   xyz         2     NONE   float   xyz 
// NORMAL                   0   xyzw        3     NONE   float   xyzw
// TEXCOORD                 0   xyzw        4     NONE   float   xyzw
// TEXCOORD                 1   xyzw        5     NONE   float   xyzw
// TEXCOORD                 2   xyzw        6     NONE   float   xyzw
//
vs_4_0
dcl_resource_texture2d (float,float,float,float) t125
dcl_resource_texture1d (float,float,float,float) t120

dcl_immediateConstantBuffer { { 1.000000, 0, 0, 0},
                              { 0, 1.000000, 0, 0},
                              { 0, 0, 1.000000, 0},
                              { 0, 0, 0, 1.000000} }
dcl_constantbuffer cb0[25], immediateIndexed
dcl_constantbuffer cb3[6], immediateIndexed
dcl_constantbuffer cb5[394], dynamicIndexed
dcl_input v0.xyzw
dcl_input v1.xyzw
dcl_input v2.xyzw
dcl_input v3.xyz
dcl_input v4.xyz
dcl_input v5.xyz
dcl_input v6.xyzw
dcl_output_siv o0.xyzw, position
dcl_output o1.xyz
dcl_output o2.xyz
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_output o6.xyzw
dcl_temps 8
mov r0.xyzw, l(0,0,0,0)
mov r1.xyzw, l(0,0,0,0)
mov r2.xyzw, l(0,0,0,0)
mov r3.xy, l(0,0,0,0)
loop 
  ige r3.z, r3.y, l(4)
  breakc_nz r3.z
  dp4 r3.z, v2.xyzw, icb[r3.y + 0].xyzw
  lt r3.w, l(0.000000), r3.z
  if_nz r3.w
    ineg r3.w, r3.y
    ult r4.xyz, r3.yyyy, l(1, 2, 3, 0)
    and r5.y, r3.w, r4.y
    iadd r3.w, r3.y, l(-3)
    movc r5.z, r4.y, l(0), r3.w
    ieq r5.w, r4.z, l(0)
    mov r5.x, r4.x
    and r4.xyzw, r5.xyzw, v1.xyzw
    or r4.xy, r4.ywyy, r4.xzxx
    or r3.w, r4.y, r4.x
    imul null, r3.w, r3.w, l(3)
    mul r4.xyz, cb5[r3.w + 10].zxyz, cb5[r3.w + 11].yzxy
    mad r4.xyz, cb5[r3.w + 10].yzxy, cb5[r3.w + 11].zxyz, -r4.xyzx
    mul r5.x, r3.z, cb5[r3.w + 10].w
    mul r5.y, r3.z, cb5[r3.w + 11].w
    mul r5.z, r3.z, cb5[r3.w + 12].w
    mad r0.xyz, cb5[r3.w + 10].xyzx, r3.zzzz, r0.xyzx
    mad r1.xyz, cb5[r3.w + 11].xyzx, r3.zzzz, r1.xyzx
    mad r2.xyz, r4.xyzx, r3.zzzz, r2.xyzx
    mov r4.x, r0.w
    mov r4.y, r1.w
    mov r4.z, r2.w
    add r4.xyz, r5.xyzx, r4.xyzx
    mad r3.x, cb5[r3.w + 12].z, r3.z, r3.x
    mov r0.w, r4.x
    mov r1.w, r4.y
    mov r2.w, r4.z
  endif 
  iadd r3.y, r3.y, l(1)
endloop 
mov r4.xyz, v0.xyzx
mov r4.w, l(1.000000)
dp4 r0.w, r0.xyzw, r4.xyzw
dp4 r1.w, r1.xyzw, r4.xyzw
dp4 r2.w, r2.xyzw, r4.xyzw
dp3 r3.y, r0.xyzx, v3.xyzx
dp3 r3.z, r1.xyzx, v3.xyzx
dp3 r3.w, r2.xyzx, v3.xyzx
dp3 r4.x, r0.xyzx, v4.xyzx
dp3 r4.y, r1.xyzx, v4.xyzx
dp3 r4.z, r2.xyzx, v4.xyzx
dp3 r0.x, r0.xyzx, v5.xyzx
dp3 r0.y, r1.xyzx, v5.xyzx
dp3 r0.z, r2.xyzx, v5.xyzx
mul r5.xyzw, r1.wwww, cb5[5].xyzw
mad r5.xyzw, cb5[4].xyzw, r0.wwww, r5.xyzw
mad r5.xyzw, cb5[6].xyzw, r2.wwww, r5.xyzw
add r5.xyzw, r5.xyzw, cb5[7].xyzw
mul r1.xyz, r3.zzzz, cb5[1].xyzx
mad r1.xyz, cb5[0].xyzx, r3.yyyy, r1.xyzx
mad r1.xyz, cb5[2].xyzx, r3.wwww, r1.xyzx
mul r2.xyz, r4.yyyy, cb5[1].xyzx
mad r2.xyz, cb5[0].xyzx, r4.xxxx, r2.xyzx
mad r2.xyz, cb5[2].xyzx, r4.zzzz, r2.xyzx
mul r3.yzw, r0.yyyy, cb5[1].xxyz
mad r3.yzw, cb5[0].xxyz, r0.xxxx, r3.yyzw
mad r0.xyz, cb5[2].xyzx, r0.zzzz, r3.yzwy
add o4.xyzw, v6.xyzw, cb3[5].xyzw
mul o6.w, r3.x, v0.w
mul r3.xyz, r1.wwww, cb5[1].xyzx
mad r3.xyz, cb5[0].xyzx, r0.wwww, r3.xyzx
mad r3.xyz, cb5[2].xyzx, r2.wwww, r3.xyzx
add r3.xyz, r3.xyzx, cb5[3].xyzx
add r3.xyz, -r3.xyzx, cb0[24].xyzx
dp3 o6.x, r1.xyzx, r3.xyzx
dp3 o6.y, r2.xyzx, r3.xyzx
dp3 o6.z, r0.xyzx, r3.xyzx

ld_indexable(texture2d)(float,float,float,float) r6.xyzw, l(0, 0, 0, 0), t125.xyzw
ld_indexable(texture1d)(float,float,float,float) r7.xyzw, l(2, 0, 0, 0), t120.xyzw
if_nz r7.y

mul r6.w, r6.y, r6.x
add r5.x, r6.w, r5.x

endif

mov o0.xyzw, r5.xyzw
mov o3.xyz, r0.xyzx
mov o3.w, l(1.000000)
mov o5.w, r5.w
mov o5.xyz, r3.xyzx
mov o1.xyz, r1.xyzx
mov o2.xyz, r2.xyzx
ret 
// Approximately 85 instruction slots used
