//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.17672
//
//   using 3Dmigoto v1.2.27 on Mon Feb 08 02:07:18 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
//   float4 TexcoordScales;             // Offset:   16 Size:    16
//
// }
//
// cbuffer MaterialBuffer
// {
//
//   float4 MaterialParams[512];        // Offset:    0 Size:  8192
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// 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
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// NORMAL                   0   xyz         0     NONE   float   xyz 
// BLENDWEIGHT              0   xyzw        1     NONE   float       
// BLENDINDICES             0   xyzw        2     NONE   float   x   
// TEXCOORD                 3   xyzw        3     NONE   float   xyzw
// TEXCOORD                 4   xyzw        4     NONE   float   xyzw
// TEXCOORD                 2   xyzw        5     NONE   float   xyzw
// COLOR                    0   xyzw        6     NONE   float       
// TEXCOORD                 0   xyzw        7     NONE   float   xy  
// POSITION                 0   xyz         8     NONE   float   xyz 
// SV_InstanceID            0   x           9   INSTID    uint   x   
// SV_VertexID              0   x          10   VERTID    uint       
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xyzw        1     NONE   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[4], immediateIndexed
dcl_constantbuffer cb1[4093], dynamicIndexed
dcl_constantbuffer cb2[76], immediateIndexed
dcl_constantbuffer cb3[2], immediateIndexed
dcl_constantbuffer cb4[1], immediateIndexed
dcl_input v0.xyz
dcl_input v2.x
dcl_input v3.xyzw
dcl_input v4.xyzw
dcl_input v5.xyzw
dcl_input v7.xy
dcl_input v8.xyz
dcl_input_sgv v9.x, instance_id
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_temps 4
utof r0.x, v9.x
mul r0.x, r0.x, cb1[0].x
round_z r0.x, r0.x
mul r0.y, v2.x, l(255.000000)
round_ne r0.y, r0.y
add r0.x, r0.y, r0.x
ftou r0.x, r0.x
ishl r0.x, r0.x, l(2)
mov r1.xyz, v8.xyzx
mov r1.w, l(1.000000)
dp4 r0.y, cb1[r0.x + 1].xyzw, r1.xyzw
dp4 r0.z, cb1[r0.x + 2].xyzw, r1.xyzw
dp4 r0.w, cb1[r0.x + 3].xyzw, r1.xyzw
add r0.y, r0.z, r0.y
add r0.y, r0.w, r0.y
mul r0.y, r0.y, cb4[0].w
mad r0.y, cb2[24].x, cb4[0].y, r0.y
sincos r0.y, null, r0.y
mul r0.y, r0.y, cb4[0].z
mad r0.zw, cb1[r0.x + 4].xxxy, v8.xxxy, cb1[r0.x + 4].zzzw
mad r1.xyz, v5.xyzx, r0.zzzz, v8.xyzx
mul r2.xy, r0.zwzz, r0.zwzz
mad r1.xyz, r2.xxxx, v3.xyzx, r1.xyzx
mad r1.xyz, v4.xyzx, r0.wwww, r1.xyzx
mov r3.x, v5.w
mov r3.y, v3.w
mov r3.z, v4.w
mad r1.xyz, r2.yyyy, r3.xyzx, r1.xyzx
mov r1.w, l(1.000000)
dp4 r2.x, cb1[r0.x + 1].xyzw, r1.xyzw
dp4 r2.y, cb1[r0.x + 2].xyzw, r1.xyzw
dp4 r2.z, cb1[r0.x + 3].xyzw, r1.xyzw
mad r1.xyz, cb3[0].xxxx, v0.xyzx, cb3[0].yyyy
dp3 r3.x, cb1[r0.x + 1].xyzx, r1.xyzx
dp3 r3.y, cb1[r0.x + 2].xyzx, r1.xyzx
dp3 r3.z, cb1[r0.x + 3].xyzx, r1.xyzx
mad r0.xyz, r0.yyyy, r3.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, v7.xyxx, cb3[1].xxxx
mov o1.zw, l(0,0,0,0)
ret 
// Approximately 47 instruction slots used
