//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.17672
//
//   using 3Dmigoto v1.2.27 on Mon Feb 08 02:38:19 2016
//
//
// Buffer Definitions: 
//
// cbuffer WorldBuffer
// {
//
//   struct WorldStruct
//   {
//       
//       row_major float4x4 ViewProject;// Offset:    0
//       
//       struct WorldStruct_PerInstanceData
//       {
//           
//           row_major float4x4 World;  // Offset:   64
//           row_major float4x4 WorldViewProject;// Offset:  128
//
//       } PerInstance[256];            // Offset:   64
//
//   } WorldParameters;                 // Offset:    0 Size: 32832
//
// }
//
// cbuffer SkinningBuffer
// {
//
//   struct SkinningStruct
//   {
//       
//       float NumSkinMatricesPerInstance;// Offset:    0
//       row_major float4x4 SkinMatrices[1023];// Offset:   16
//
//   } SkinningParameters;              // Offset:    0 Size: 65488
//
// }
//
// cbuffer SceneBuffer
// {
//
//   row_major float4x4 View;           // Offset:    0 Size:    64 [unused]
//   row_major float4x4 ScreenMatrix;   // Offset:   64 Size:    64 [unused]
//   float2 DepthExportScale;           // Offset:  128 Size:     8 [unused]
//   float2 __padding0;                 // Offset:  136 Size:     8 [unused]
//   float4 FogParams;                  // Offset:  144 Size:    16 [unused]
//   float3 __CameraPosition;           // Offset:  160 Size:    12 [unused]
//   float __padding12;                 // Offset:  172 Size:     4 [unused]
//   float3 CameraDirection;            // Offset:  176 Size:    12 [unused]
//   float __padding9;                  // Offset:  188 Size:     4 [unused]
//   float3 DepthFactors;               // Offset:  192 Size:    12 [unused]
//   float __padding10;                 // Offset:  204 Size:     4 [unused]
//   float3 ShadowDepthBiasAndLightType;// Offset:  208 Size:    12 [unused]
//   float __padding11;                 // Offset:  220 Size:     4 [unused]
//   float4 SubframeViewport;           // Offset:  224 Size:    16 [unused]
//   row_major float3x4 DepthToWorld;   // Offset:  240 Size:    48 [unused]
//   float4 DepthToView;                // Offset:  288 Size:    16 [unused]
//   float4 OneOverDepthToView;         // Offset:  304 Size:    16 [unused]
//   float4 DepthToW;                   // Offset:  320 Size:    16 [unused]
//   float4 ClipPlane;                  // Offset:  336 Size:    16 [unused]
//   float2 ViewportDepthScaleOffset;   // Offset:  352 Size:     8 [unused]
//   float2 __padding1;                 // Offset:  360 Size:     8 [unused]
//   float2 ColorDOFDepthScaleOffset;   // Offset:  368 Size:     8 [unused]
//   float2 __padding2;                 // Offset:  376 Size:     8 [unused]
//   float4 TimeVector;                 // Offset:  384 Size:    16
//   float4 FogParams2;                 // Offset:  400 Size:    16 [unused]
//   float4 FogParams3;                 // Offset:  416 Size:    16 [unused]
//   float3 GlobalAmbient;              // Offset:  432 Size:    12 [unused]
//   float __padding8;                  // Offset:  444 Size:     4 [unused]
//   float4 GlobalParams[16];           // Offset:  448 Size:   256 [unused]
//   float4 ViewToFogH;                 // Offset:  704 Size:    16 [unused]
//   float4 ScreenExtents;              // Offset:  720 Size:    16 [unused]
//   float2 ScreenResolution;           // Offset:  736 Size:     8 [unused]
//   float2 __padding3;                 // Offset:  744 Size:     8 [unused]
//   float4 PSSMToMap1Lin;              // Offset:  752 Size:    16 [unused]
//   float4 PSSMToMap1Const;            // Offset:  768 Size:    16 [unused]
//   float4 PSSMToMap2Lin;              // Offset:  784 Size:    16 [unused]
//   float4 PSSMToMap2Const;            // Offset:  800 Size:    16 [unused]
//   float4 PSSMToMap3Lin;              // Offset:  816 Size:    16 [unused]
//   float4 PSSMToMap3Const;            // Offset:  832 Size:    16 [unused]
//   float4 PSSMDistances;              // Offset:  848 Size:    16 [unused]
//   row_major float4x4 WorldToPSSM0;   // Offset:  864 Size:    64 [unused]
//   row_major float4x4 PrevViewProject;// Offset:  928 Size:    64 [unused]
//   row_major float4x4 PrevWorld;      // Offset:  992 Size:    64 [unused]
//   row_major float4x4 ViewT;          // Offset: 1056 Size:    64 [unused]
//   float4 PSSMExtents;                // Offset: 1120 Size:    16 [unused]
//   float4 ShadowAtlasResolution;      // Offset: 1136 Size:    16 [unused]
//   float4 UnitRimData[3];             // Offset: 1152 Size:    48 [unused]
//   float3 __CameraPositionForCorrection;// Offset: 1200 Size:    12
//   float __padding7;                  // Offset: 1212 Size:     4 [unused]
//   row_major float4x4 CameraViewProject;// Offset: 1216 Size:    64 [unused]
//   float4 BackBufferResolution;       // Offset: 1280 Size:    16 [unused]
//   row_major float4x4 InverseProjection;// Offset: 1296 Size:    64 [unused]
//   float4 StereoOffset;               // Offset: 1360 Size:    16 [unused]
//   row_major float4x4 Projection;     // Offset: 1376 Size:    64 [unused]
//   row_major float4x4 ViewInv;        // Offset: 1440 Size:    64 [unused]
//   float4 ColorSSAO;                  // Offset: 1504 Size:    16 [unused]
//   float4 GlobalFogColor;             // Offset: 1520 Size:    16 [unused]
//   float4 VolumetricLightGlobalParams;// Offset: 1536 Size:    16 [unused]
//   float4 SnowParams01;               // Offset: 1552 Size:    16 [unused]
//   float4 SnowParams02;               // Offset: 1568 Size:    16 [unused]
//   float4 SnowParams03;               // Offset: 1584 Size:    16 [unused]
//   int SSREnabled;                    // Offset: 1600 Size:     4 [unused]
//   int __padding4;                    // Offset: 1604 Size:     4 [unused]
//   int __padding5;                    // Offset: 1608 Size:     4 [unused]
//   int __padding6;                    // Offset: 1612 Size:     4 [unused]
//
// }
//
// cbuffer StreamDeclBuffer
// {
//
//   float4 NormalScaleOffset;          // Offset:    0 Size:    16 [unused]
//   float4 TexcoordScales;             // Offset:   16 Size:    16
//
// }
//
// cbuffer MaterialBuffer
// {
//
//   float4 MaterialParams[512];        // Offset:    0 Size:  8192
//
// }
//
// cbuffer InstanceBuffer
// {
//
//   struct InstanceStruct
//   {
//       
//       float4 InstanceParams[8];      // Offset:    0
//
//   } InstanceParameters[256];         // Offset:    0 Size: 32768
//
// }
//
// cbuffer BlendShapeBuffer
// {
//
//   uint4 uDataBS;                     // Offset:    0 Size:    16
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// g_vBShapeVertexDiffs              texture  float3         buf   49        1
// WorldBuffer                       cbuffer      NA          NA    0        1
// SkinningBuffer                    cbuffer      NA          NA    1        1
// SceneBuffer                       cbuffer      NA          NA    2        1
// StreamDeclBuffer                  cbuffer      NA          NA    3        1
// MaterialBuffer                    cbuffer      NA          NA    4        1
// InstanceBuffer                    cbuffer      NA          NA    5        1
// BlendShapeBuffer                  cbuffer      NA          NA    9        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// NORMAL                   0   xyz         0     NONE   float       
// BLENDWEIGHT              0   xyzw        1     NONE   float       
// BLENDINDICES             0   xyzw        2     NONE   float   x   
// COLOR                    0   xyzw        3     NONE   float     z 
// TEXCOORD                 0   xyzw        4     NONE   float   xy  
// POSITION                 0   xyz         5     NONE   float   xyz 
// SV_InstanceID            0   x           6   INSTID    uint   x   
// SV_VertexID              0   x           7   VERTID    uint   x   
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 1   xyzw        2     NONE   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[4], immediateIndexed
dcl_constantbuffer cb1[4092], dynamicIndexed
dcl_constantbuffer cb2[76], immediateIndexed
dcl_constantbuffer cb3[2], immediateIndexed
dcl_constantbuffer cb4[1], immediateIndexed
dcl_constantbuffer cb5[2046], dynamicIndexed
dcl_constantbuffer cb9[1], immediateIndexed
dcl_resource_buffer (float,float,float,float) t49
dcl_input v2.x
dcl_input v3.z
dcl_input v4.xy
dcl_input v5.xyz
dcl_input_sgv v6.x, instance_id
dcl_input_sgv v7.x, vertex_id
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_temps 3
mul r0.x, cb2[24].x, cb4[0].z
sincos r0.x, null, r0.x
mul r0.z, r0.x, cb4[0].w
mov r0.xy, l(1.000000,0,0,0)
mul r0.xyz, r0.xyzx, cb4[0].yyyy
utof r0.w, v6.x
mul r0.w, r0.w, cb1[0].x
round_z r0.w, r0.w
mul r1.x, v2.x, l(255.000000)
round_ne r1.x, r1.x
add r0.w, r0.w, r1.x
ftou r0.w, r0.w
ishl r0.w, r0.w, l(2)
add r1.x, -v3.z, l(1.000000)
mul r1.y, v3.z, l(25.000000)
mad r1.x, r1.x, l(8.000000), r1.y
iadd r1.y, v7.x, cb9[0].x
imul null, r1.y, r1.y, l(3)
ld_indexable(buffer)(float,float,float,float) r1.yzw, r1.yyyy, t49.wxyz
mad r1.xyz, r1.xxxx, r1.yzwy, v5.xyzx
mov r1.w, l(1.000000)
dp4 r2.x, cb1[r0.w + 1].xyzw, r1.xyzw
dp4 r2.y, cb1[r0.w + 2].xyzw, r1.xyzw
dp4 r2.z, cb1[r0.w + 3].xyzw, r1.xyzw
add r0.w, -v5.x, l(100.000000)
ishl r1.x, v6.x, l(3)
mad_sat r1.y, -r0.w, l(0.005000), cb5[r1.x + 5].y
mul r0.w, r0.w, l(0.005000)
lt r0.w, r0.w, cb5[r1.x + 5].y
mov o2.w, cb5[r1.x + 5].y
mad r0.xyz, r1.yyyy, r0.xyzx, r2.xyzx
movc r0.xyz, r0.wwww, r0.xyzx, r2.xyzx
add r0.xyz, r0.xyzx, -cb2[75].xyzx
mul r1.xyzw, r0.yyyy, cb0[1].xyzw
mad r1.xyzw, r0.xxxx, cb0[0].xyzw, r1.xyzw
mad r0.xyzw, r0.zzzz, cb0[2].xyzw, r1.xyzw
add r0.xyzw, r0.xyzw, cb0[3].xyzw
mul o0.z, |r0.w|, r0.z
mov o0.xyw, r0.xyxw
mul o1.xy, v4.xyxx, cb3[1].xxxx
mov o1.zw, l(0,0,0,0)
mov o2.xy, l(0,0,0,0)
mad o2.z, v5.x, l(-0.005000), l(0.500000)
ret 
// Approximately 44 instruction slots used
