//characters 3
cbuffer cb_object1 : register(b0)
{
  float4x4 u_mvMatrix : packoffset(c0);
  float4x4 u_mvpMatrix : packoffset(c4);
  float4x4 u_mlpMatrix : packoffset(c8);
  float4 u_tex0ScaleOffset : packoffset(c12);
}

cbuffer cb_object3 : register(b1)
{
  int u_bonesPerVertex : packoffset(c0);
  int pad1 : packoffset(c0.y);
  int pad2 : packoffset(c0.z);
  int pad3 : packoffset(c0.w);
  float4 u_boneWeightsMask : packoffset(c1);
  float4x4 u_boneMatrixArray[64] : packoffset(c2);
}

Texture2D<float4> StereoParams : register(t125);
Texture1D<float4> IniParams : register(t120);

void main(
  float4 v0 : POSITION0,
  float3 v1 : NORMAL0,
  float2 v2 : TEXCOORD0,
  uint4 v3 : BLENDINDICES0,
  float4 v4 : BLENDWEIGHT0,
  out float4 o0 : SV_Position0,
  out float4 o1 : POSITION1,
  out float4 o2 : POSITION2,
  out float4 o3 : NORMAL0,
  out float3 o4 : COLOR0,
  out float2 o5 : TEXCOORD0)
{
  float4 r0,r1,r2,r3,r4;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.x = (int)0 < (int)u_bonesPerVertex;
  if (r0.x != 0) {
    r0.xyzw = u_boneWeightsMask.xyzw * v4.xyzw;
    r1.x = dot(r0.xyzw, r0.xyzw);
    r1.x = rsqrt(r1.x);
    r0.xyzw = r1.xxxx * r0.xyzw;
    r1.xyzw = (uint4)v3.xyzw << 2;
    r2.xyz = v0.xyz;
    r2.w = 1.000000000e+000;
    r3.x = dot(r2.xyzw, u_boneMatrixArray[r1.x/4]._m00_m10_m20_m30);
    r3.y = dot(r2.xyzw, u_boneMatrixArray[r1.x/4]._m01_m11_m21_m31);
    r3.z = dot(r2.xyzw, u_boneMatrixArray[r1.x/4]._m02_m12_m22_m32);
    r3.w = dot(r2.xyzw, u_boneMatrixArray[r1.x/4]._m03_m13_m23_m33);
    r4.x = dot(r2.xyzw, u_boneMatrixArray[r1.y/4]._m00_m10_m20_m30);
    r4.y = dot(r2.xyzw, u_boneMatrixArray[r1.y/4]._m01_m11_m21_m31);
    r4.z = dot(r2.xyzw, u_boneMatrixArray[r1.y/4]._m02_m12_m22_m32);
    r4.w = dot(r2.xyzw, u_boneMatrixArray[r1.y/4]._m03_m13_m23_m33);
    r4.xyzw = r4.xyzw * r0.yyyy;

//r3.xyzw = r0.xxxx * r3.xyzw + r4.xyzw;// disabled

    r4.x = dot(r2.xyzw, u_boneMatrixArray[r1.z/4]._m00_m10_m20_m30);
    r4.y = dot(r2.xyzw, u_boneMatrixArray[r1.z/4]._m01_m11_m21_m31);
    r4.z = dot(r2.xyzw, u_boneMatrixArray[r1.z/4]._m02_m12_m22_m32);
    r4.w = dot(r2.xyzw, u_boneMatrixArray[r1.z/4]._m03_m13_m23_m33);
    r3.xyzw = r0.zzzz * r4.xyzw + r3.xyzw;
    r4.x = dot(r2.xyzw, u_boneMatrixArray[r1.w/4]._m00_m10_m20_m30);
    r4.y = dot(r2.xyzw, u_boneMatrixArray[r1.w/4]._m01_m11_m21_m31);
    r4.z = dot(r2.xyzw, u_boneMatrixArray[r1.w/4]._m02_m12_m22_m32);
    r4.w = dot(r2.xyzw, u_boneMatrixArray[r1.w/4]._m03_m13_m23_m33);
    r2.xyzw = r0.wwww * r4.xyzw + r3.xyzw;
    r3.x = dot(v1.xyz, u_boneMatrixArray[r1.x/4]._m00_m10_m20);
    r3.y = dot(v1.xyz, u_boneMatrixArray[r1.x/4]._m01_m11_m21);
    r3.z = dot(v1.xyz, u_boneMatrixArray[r1.x/4]._m02_m12_m22);
    r4.x = dot(v1.xyz, u_boneMatrixArray[r1.y/4]._m00_m10_m20);
    r4.y = dot(v1.xyz, u_boneMatrixArray[r1.y/4]._m01_m11_m21);
    r4.z = dot(v1.xyz, u_boneMatrixArray[r1.y/4]._m02_m12_m22);
    r4.xyz = r4.xyz * r0.yyy;
    r3.xyz = r3.xyz * r0.xxx + r4.xyz;
    r4.x = dot(v1.xyz, u_boneMatrixArray[r1.z/4]._m00_m10_m20);
    r4.y = dot(v1.xyz, u_boneMatrixArray[r1.z/4]._m01_m11_m21);
    r4.z = dot(v1.xyz, u_boneMatrixArray[r1.z/4]._m02_m12_m22);
    r0.xyz = r4.xyz * r0.zzz + r3.xyz;
    r1.x = dot(v1.xyz, u_boneMatrixArray[r1.w/4]._m00_m10_m20);
    r1.y = dot(v1.xyz, u_boneMatrixArray[r1.w/4]._m01_m11_m21);
    r1.z = dot(v1.xyz, u_boneMatrixArray[r1.w/4]._m02_m12_m22);
    r0.xyz = r1.xyz * r0.www + r0.xyz;
  } else {
    r2.xyzw = v0.xyzw;
    r0.xyz = v1.xyz;
  }
  o3.x = dot(r0.xyz, u_mvMatrix._m00_m10_m20);
  o3.y = dot(r0.xyz, u_mvMatrix._m01_m11_m21);
  o3.z = dot(r0.xyz, u_mvMatrix._m02_m12_m22);
  o3.w = dot(r0.xyz, u_mvMatrix._m03_m13_m23);
  r0.x = dot(r2.xyzw, u_mvpMatrix._m00_m10_m20_m30);
  r0.y = dot(r2.xyzw, u_mvpMatrix._m01_m11_m21_m31);
  r0.z = dot(r2.xyzw, u_mvpMatrix._m02_m12_m22_m32);
  r0.w = dot(r2.xyzw, u_mvpMatrix._m03_m13_m23_m33);
  o1.x = dot(r2.xyzw, u_mvMatrix._m00_m10_m20_m30);
  o1.y = dot(r2.xyzw, u_mvMatrix._m01_m11_m21_m31);
  o1.z = dot(r2.xyzw, u_mvMatrix._m02_m12_m22_m32);
  o1.w = dot(r2.xyzw, u_mvMatrix._m03_m13_m23_m33);
  o2.x = dot(v0.xyzw, u_mvMatrix._m00_m10_m20_m30);
  o2.y = dot(v0.xyzw, u_mvMatrix._m01_m11_m21_m31);
  o2.z = dot(v0.xyzw, u_mvMatrix._m02_m12_m22_m32);
  o2.w = dot(v0.xyzw, u_mvMatrix._m03_m13_m23_m33);
  r1.x = dot(r0.xyzw, u_mlpMatrix._m00_m10_m20_m30);
  r1.y = dot(r0.xyzw, u_mlpMatrix._m01_m11_m21_m31);
  r1.z = dot(r0.xyzw, u_mlpMatrix._m02_m12_m22_m32);
  r1.w = dot(r0.xyzw, u_mlpMatrix._m03_m13_m23_m33);
  o4.xyz = saturate(r1.xyz / r1.www);
  o5.xy = v2.xy * u_tex0ScaleOffset.xy + u_tex0ScaleOffset.zw;
  o0.xyzw = r0.xyzw;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//
// Buffer Definitions: 
//
// cbuffer cb_object1
// {
//
//   float4x4 u_mvMatrix;               // Offset:    0 Size:    64
//   float4x4 u_mvpMatrix;              // Offset:   64 Size:    64
//   float4x4 u_mlpMatrix;              // Offset:  128 Size:    64
//   float4 u_tex0ScaleOffset;          // Offset:  192 Size:    16
//
// }
//
// cbuffer cb_object3
// {
//
//   int u_bonesPerVertex;              // Offset:    0 Size:     4
//   int pad1;                          // Offset:    4 Size:     4 [unused]
//   int pad2;                          // Offset:    8 Size:     4 [unused]
//   int pad3;                          // Offset:   12 Size:     4 [unused]
//   float4 u_boneWeightsMask;          // Offset:   16 Size:    16
//   float4x4 u_boneMatrixArray[64];    // Offset:   32 Size:  4096
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// cb_object1                        cbuffer      NA          NA    0        1
// cb_object3                        cbuffer      NA          NA    1        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// NORMAL                   0   xyz         1     NONE   float   xyz 
// TEXCOORD                 0   xy          2     NONE   float   xy  
// BLENDINDICES             0   xyzw        3     NONE    uint   xyzw
// BLENDWEIGHT              0   xyzw        4     NONE   float   xyzw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// POSITION                 1   xyzw        1     NONE   float   xyzw
// POSITION                 2   xyzw        2     NONE   float   xyzw
// NORMAL                   0   xyzw        3     NONE   float   xyzw
// COLOR                    0   xyz         4     NONE   float   xyz 
// TEXCOORD                 0   xy          5     NONE   float   xy  
//
vs_4_0
dcl_constantbuffer cb0[13], immediateIndexed
dcl_constantbuffer cb1[258], dynamicIndexed
dcl_input v0.xyzw
dcl_input v1.xyz
dcl_input v2.xy
dcl_input v3.xyzw
dcl_input v4.xyzw
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyz
dcl_output o5.xy
dcl_temps 5
ilt r0.x, l(0), cb1[0].x
if_nz r0.x
  mul r0.xyzw, v4.xyzw, cb1[1].xyzw
  dp4 r1.x, r0.xyzw, r0.xyzw
  rsq r1.x, r1.x
  mul r0.xyzw, r0.xyzw, r1.xxxx
  ishl r1.xyzw, v3.xyzw, l(2)
  mov r2.xyz, v0.xyzx
  mov r2.w, l(1.000000)
  dp4 r3.x, r2.xyzw, cb1[r1.x + 2].xyzw
  dp4 r3.y, r2.xyzw, cb1[r1.x + 3].xyzw
  dp4 r3.z, r2.xyzw, cb1[r1.x + 4].xyzw
  dp4 r3.w, r2.xyzw, cb1[r1.x + 5].xyzw
  dp4 r4.x, r2.xyzw, cb1[r1.y + 2].xyzw
  dp4 r4.y, r2.xyzw, cb1[r1.y + 3].xyzw
  dp4 r4.z, r2.xyzw, cb1[r1.y + 4].xyzw
  dp4 r4.w, r2.xyzw, cb1[r1.y + 5].xyzw
  mul r4.xyzw, r0.yyyy, r4.xyzw
  mad r3.xyzw, r0.xxxx, r3.xyzw, r4.xyzw
  dp4 r4.x, r2.xyzw, cb1[r1.z + 2].xyzw
  dp4 r4.y, r2.xyzw, cb1[r1.z + 3].xyzw
  dp4 r4.z, r2.xyzw, cb1[r1.z + 4].xyzw
  dp4 r4.w, r2.xyzw, cb1[r1.z + 5].xyzw
  mad r3.xyzw, r0.zzzz, r4.xyzw, r3.xyzw
  dp4 r4.x, r2.xyzw, cb1[r1.w + 2].xyzw
  dp4 r4.y, r2.xyzw, cb1[r1.w + 3].xyzw
  dp4 r4.z, r2.xyzw, cb1[r1.w + 4].xyzw
  dp4 r4.w, r2.xyzw, cb1[r1.w + 5].xyzw
  mad r2.xyzw, r0.wwww, r4.xyzw, r3.xyzw
  dp3 r3.x, v1.xyzx, cb1[r1.x + 2].xyzx
  dp3 r3.y, v1.xyzx, cb1[r1.x + 3].xyzx
  dp3 r3.z, v1.xyzx, cb1[r1.x + 4].xyzx
  dp3 r4.x, v1.xyzx, cb1[r1.y + 2].xyzx
  dp3 r4.y, v1.xyzx, cb1[r1.y + 3].xyzx
  dp3 r4.z, v1.xyzx, cb1[r1.y + 4].xyzx
  mul r4.xyz, r0.yyyy, r4.xyzx
  mad r3.xyz, r3.xyzx, r0.xxxx, r4.xyzx
  dp3 r4.x, v1.xyzx, cb1[r1.z + 2].xyzx
  dp3 r4.y, v1.xyzx, cb1[r1.z + 3].xyzx
  dp3 r4.z, v1.xyzx, cb1[r1.z + 4].xyzx
  mad r0.xyz, r4.xyzx, r0.zzzz, r3.xyzx
  dp3 r1.x, v1.xyzx, cb1[r1.w + 2].xyzx
  dp3 r1.y, v1.xyzx, cb1[r1.w + 3].xyzx
  dp3 r1.z, v1.xyzx, cb1[r1.w + 4].xyzx
  mad r0.xyz, r1.xyzx, r0.wwww, r0.xyzx
else 
  mov r2.xyzw, v0.xyzw
  mov r0.xyz, v1.xyzx
endif 
dp3 o3.x, r0.xyzx, cb0[0].xyzx
dp3 o3.y, r0.xyzx, cb0[1].xyzx
dp3 o3.z, r0.xyzx, cb0[2].xyzx
dp3 o3.w, r0.xyzx, cb0[3].xyzx
dp4 r0.x, r2.xyzw, cb0[4].xyzw
dp4 r0.y, r2.xyzw, cb0[5].xyzw
dp4 r0.z, r2.xyzw, cb0[6].xyzw
dp4 r0.w, r2.xyzw, cb0[7].xyzw
dp4 o1.x, r2.xyzw, cb0[0].xyzw
dp4 o1.y, r2.xyzw, cb0[1].xyzw
dp4 o1.z, r2.xyzw, cb0[2].xyzw
dp4 o1.w, r2.xyzw, cb0[3].xyzw
dp4 o2.x, v0.xyzw, cb0[0].xyzw
dp4 o2.y, v0.xyzw, cb0[1].xyzw
dp4 o2.z, v0.xyzw, cb0[2].xyzw
dp4 o2.w, v0.xyzw, cb0[3].xyzw
dp4 r1.x, r0.xyzw, cb0[8].xyzw
dp4 r1.y, r0.xyzw, cb0[9].xyzw
dp4 r1.z, r0.xyzw, cb0[10].xyzw
dp4 r1.w, r0.xyzw, cb0[11].xyzw
div_sat o4.xyz, r1.xyzx, r1.wwww
mad o5.xy, v2.xyxx, cb0[12].xyxx, cb0[12].zwzz
mov o0.xyzw, r0.xyzw
ret 
// Approximately 73 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
