//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.17672
//
//   using 3Dmigoto v1.2.27 on Mon Feb 08 02:07:38 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 DrawableBuffer
// {
//
//   float4 FogColor;                   // Offset:    0 Size:    16 [unused]
//   float4 DebugColor;                 // Offset:   16 Size:    16 [unused]
//   float AlphaThreshold;              // Offset:   32 Size:     4
//   float4 __InstancedMaterialOpacity[256];// Offset:   48 Size:  4096
//
// }
//
// cbuffer MaterialBuffer
// {
//
//   float4 MaterialParams[512];        // Offset:    0 Size:  8192
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SamplerGenericTrilinearWrap       sampler      NA          NA   11        1
// p_default_Setup_8CD6AD409878073_cp6_Param_texture    texture  float4          2d    0        1
// p_default_Material_n124_n147_Texture_texture    texture  float4          2d    1        1
// p_default_Setup_n5_n69_Texture_texture    texture  float4          2d    2        1
// p_default_Setup_n5_9075B4F026705685_cp2_Param_texture    texture  float4          2d    3        1
// p_default_Setup_n4_n69_Texture_texture    texture  float4          2d    4        1
// p_default_Setup_n4_9075B4F026705685_cp2_Param_texture    texture  float4          2d    5        1
// p_default_Setup_n3_n69_Texture_texture    texture  float4          2d    6        1
// WorldBuffer                       cbuffer      NA          NA    0        1
// DrawableBuffer                    cbuffer      NA          NA    1        1
// MaterialBuffer                    cbuffer      NA          NA    3        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xy  
// TEXCOORD                 0   xyzw        1     NONE   float   xy  
// TEXCOORD                 2   xyz         2     NONE   float   xyz 
// PSIZE                    0   x           3     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 cb0[2045], dynamicIndexed
dcl_constantbuffer cb1[259], dynamicIndexed
dcl_constantbuffer cb3[8], immediateIndexed
dcl_sampler s11, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_resource_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t6
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_input_ps linear v1.xy
dcl_input_ps linear v2.xyz
dcl_input_ps constant v3.x
dcl_output o0.xyzw
dcl_temps 4
mul r0.xy, v0.xyxx, l(0.250000, 0.250000, 0.000000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t1.xyzw, s11
mov r0.y, v3.x
mad r0.x, r0.x, cb1[r0.y + 3].y, cb1[r0.y + 3].z
add r0.y, -cb1[2].x, l(1.000000)
min r0.x, r0.x, r0.y
lt r0.x, r0.x, l(0.000000)
discard_nz r0.x
add r0.x, cb3[6].w, -cb3[7].x
ishl r0.y, v3.x, l(3)
dp3 r0.y, cb0[r0.y + 4].xyzx, cb0[r0.y + 4].xyzx
sqrt r0.y, r0.y
mul r0.zw, r0.yyyy, v1.xxxy
mul r1.xy, r0.zwzz, cb3[4].zwzz
mul r2.xyzw, r0.zwzw, cb3[3].zwxy
sample_indexable(texture2d)(float,float,float,float) r0.z, r1.xyxx, t4.xzyw, s11
mad r0.x, r0.z, r0.x, cb3[7].x
sample_indexable(texture2d)(float,float,float,float) r0.z, r2.xyxx, t6.xzyw, s11
sample_indexable(texture2d)(float,float,float,float) r0.w, r2.zwzz, t2.xzwy, s11
add r1.x, -cb3[6].z, cb3[6].x
mad r0.z, r0.z, r1.x, cb3[6].z
add r0.z, r0.z, l(-1.000000)
add_sat r1.x, cb3[0].w, cb3[1].w
mad r0.z, r1.x, r0.z, l(1.000000)
add r0.x, -r0.z, r0.x
mul r1.xy, v1.xyxx, cb3[4].xyxx
mul r1.xy, r0.yyyy, r1.xyxx
sample_indexable(texture2d)(float,float,float,float) r1.y, r1.xyxx, t5.yxzw, s11
mov r1.z, l(1.000000)
mul r2.xyzw, v1.xyxy, cb3[2].zwxy
sample_indexable(texture2d)(float,float,float,float) r2.xy, r2.xyxx, t0.xyzw, s11
mul r2.zw, r0.yyyy, r2.zzzw
sample_indexable(texture2d)(float,float,float,float) r3.y, r2.zwzz, t3.yxzw, s11
mad_sat r1.x, r2.x, cb3[6].y, cb3[5].x
mad_sat r3.x, r2.y, cb3[5].z, cb3[5].w
dp3_sat r0.y, cb3[1].xyzx, r1.xyzx
mad r0.x, r0.y, r0.x, r0.z
add r0.y, cb3[5].y, -cb3[7].y
mad r0.y, r0.w, r0.y, cb3[7].y
add r0.y, -r0.x, r0.y
mov r3.z, l(1.000000)
dp3_sat r0.z, cb3[0].xyzx, r3.xyzx
mad r0.x, r0.z, r0.y, r0.x
max r0.x, r0.x, l(2.000000)
log r0.x, r0.x
add r0.x, r0.x, l(-1.000000)
mul r0.x, r0.x, l(0.0833333358)
min o0.w, r0.x, l(1.000000)
dp3 r0.x, v2.xyzx, v2.xyzx
rsq r0.x, r0.x
mul o0.xyz, r0.xxxx, v2.xyzx
ret 
// Approximately 52 instruction slots used
