//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.17672
//
//   using 3Dmigoto v1.2.27 on Mon Feb 08 02:06:25 2016
//
//
// Buffer Definitions: 
//
// cbuffer DrawableBuffer
// {
//
//   float4 FogColor;                   // Offset:    0 Size:    16 [unused]
//   float4 DebugColor;                 // Offset:   16 Size:    16 [unused]
//   float AlphaThreshold;              // Offset:   32 Size:     4 [unused]
//   float4 __InstancedMaterialOpacity[256];// Offset:   48 Size:  4096
//
// }
//
// 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
//   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 [unused]
//   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
//   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 [unused]
//   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
//   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 LightBuffer
// {
//
//   struct Light
//   {
//       
//       float4 position;               // Offset:    0
//       float3 direction;              // Offset:   16
//       float4 attParams;              // Offset:   32
//       float4 spotParams;             // Offset:   48
//       float4 diffuseColor;           // Offset:   64
//       float4 shadowFadeParams;       // Offset:   80
//
//   } ShadowLights[3];                 // Offset:    0 Size:   288 [unused]
//   
//   struct Light
//   {
//       
//       float4 position;               // Offset:  288
//       float3 direction;              // Offset:  304
//       float4 attParams;              // Offset:  320
//       float4 spotParams;             // Offset:  336
//       float4 diffuseColor;           // Offset:  352
//       float4 shadowFadeParams;       // Offset:  368
//
//   } NonShadowLights[3];              // Offset:  288 Size:   288 [unused]
//   
//   struct Light
//   {
//       
//       float4 position;               // Offset:  576
//       float3 direction;              // Offset:  592
//       float4 attParams;              // Offset:  608
//       float4 spotParams;             // Offset:  624
//       float4 diffuseColor;           // Offset:  640
//       float4 shadowFadeParams;       // Offset:  656
//
//   } SunLight;                        // Offset:  576 Size:    96 [unused]
//   row_major float4x4 WorldToShadowMap[3];// Offset:  672 Size:   192 [unused]
//   row_major float3x4 WorldToModulationMapSpot[2];// Offset:  864 Size:    96 [unused]
//   row_major float2x4 WorldToModulationMapSun;// Offset:  960 Size:    32
//   bool ShadowLightEnabled[3];        // Offset:  992 Size:    36 [unused]
//   bool NonShadowLightEnabled[3];     // Offset: 1040 Size:    36 [unused]
//   bool SunLightEnabled;              // Offset: 1088 Size:     4 [unused]
//   float4 LightAndProbeSet[24];       // Offset: 1104 Size:   384 [unused]
//   float4 LightSetInfo;               // Offset: 1488 Size:    16 [unused]
//   float4 ProbeSetInfo;               // Offset: 1504 Size:    16 [unused]
//
// }
//
// cbuffer InstanceBuffer
// {
//
//   struct InstanceStruct
//   {
//       
//       float4 InstanceParams[8];      // Offset:    0
//
//   } InstanceParameters[256];         // Offset:    0 Size: 32768
//
// }
//
// cbuffer xtendedInstanceBuffer
// {
//
//   struct ExtendedInstanceStruct
//   {
//       
//       float4 ExtendedInstanceParams[16];// Offset:    0
//
//   } ExtendedInstanceParameters[256]; // Offset:    0 Size: 65536
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SamplerGenericPointClamp          sampler      NA          NA   10        1
// SamplerGenericBilinearWrap        sampler      NA          NA   12        1
// p_default_Material_22AA56345795987_DepthBufferTexture_texture    texture  float4          2d    0        1
// p_default_Material_n33_DeferredBufferTexture_texture    texture  float4          2d    2        1
// GlobalModulationMapTextures[0]    texture  float4          2d   40        1
// DrawableBuffer                    cbuffer      NA          NA    1        1
// SceneBuffer                       cbuffer      NA          NA    2        1
// LightBuffer                       cbuffer      NA          NA    4        1
// InstanceBuffer                    cbuffer      NA          NA    5        1
// xtendedInstanceBuffer             cbuffer      NA          NA    8        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xy  
// PSIZE                    0   x           1     NONE    uint   x   
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb1[259], dynamicIndexed
dcl_constantbuffer cb2[85], immediateIndexed
dcl_constantbuffer cb4[62], immediateIndexed
dcl_constantbuffer cb5[2048], dynamicIndexed
dcl_constantbuffer cb8[4082], dynamicIndexed
dcl_sampler s10, mode_default
dcl_sampler s12, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t40
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_input_ps constant v1.x
dcl_output o0.xyzw
dcl_temps 3
mad r0.xy, v0.xyxx, cb2[45].zwzz, cb2[45].xyxx
mad r0.zw, r0.xxxy, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mul r1.xyzw, -r0.wwww, cb2[82].xyzw
mad r1.xyzw, r0.zzzz, cb2[81].xyzw, r1.xyzw
sample_l_indexable(texture2d)(float,float,float,float) r0.z, r0.xyxx, t0.yzxw, s10, l(0.000000)
sample_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t2.xyzw, s10
mad r0.y, r0.z, cb2[20].z, cb2[20].w
mad r1.xyzw, r0.yyyy, cb2[83].xyzw, r1.xyzw
add r1.xyzw, r1.xyzw, cb2[84].xyzw
div r1.xyz, r1.xyzx, r1.wwww
mov r1.w, l(1.000000)
dp4 r2.x, cb4[60].xyzw, r1.xyzw
dp4 r2.y, cb4[61].xyzw, r1.xyzw
sample_indexable(texture2d)(float,float,float,float) r0.y, r2.xyxx, t40.yxzw, s12
ishl r0.zw, v1.xxxx, l(0, 0, 3, 4)
add r1.x, cb5[r0.z + 7].y, cb5[r0.z + 7].x
add r1.x, r1.x, cb5[r0.z + 7].z
mul r0.z, r1.x, cb5[r0.z + 1].w
mul o0.xyz, l(0.000100, 0.000100, 1.000000, 0.000000), cb8[r0.w + 1].xyzx
mad r0.x, r0.z, r0.y, r0.x
mov r0.y, v1.x
mul o0.w, r0.x, cb1[r0.y + 3].x
ret 
// Approximately 23 instruction slots used
