//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.17672
//
//   using 3Dmigoto v1.2.27 on Mon Feb 08 02:08:12 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
//   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_n0_n71_Texture_texture    texture  float4          2d    0        1
// p_default_Setup_n0_n72_Texture_texture    texture  float4          2d    1        1
// p_default_Material_n124_n127_Texture_texture    texture  float4          2d    2        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 
// TEXCOORD                 3   xyz         3     NONE   float   xyz 
// TEXCOORD                 4   xyz         4     NONE   float   xyz 
// PSIZE                    0   x           5     NONE    uint   x   
// SV_IsFrontFace           0   x           6    FFACE    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 cb3[3], 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_input_ps_siv linear noperspective v0.xy, position
dcl_input_ps linear v1.xy
dcl_input_ps linear v2.xyz
dcl_input_ps linear v3.xyz
dcl_input_ps linear v4.xyz
dcl_input_ps constant v5.x
dcl_input_ps_sgv v6.x, is_front_face
dcl_output o0.xyzw
dcl_temps 2
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, t2.xyzw, s11
mov r0.y, v5.x
mad r0.x, r0.x, cb1[r0.y + 3].y, cb1[r0.y + 3].z
mad r0.yz, v1.xxyx, cb3[1].zzwz, cb3[1].xxyx
sample_indexable(texture2d)(float,float,float,float) r0.w, r0.yzyy, t1.xyzw, s11
sample_indexable(texture2d)(float,float,float,float) r0.yz, r0.yzyy, t0.zxyw, s11
mad r0.yz, r0.yyzy, l(0.000000, 2.000000, 2.000000, 0.000000), l(0.000000, -1.000000, -1.000000, 0.000000)
mad_sat r0.w, r0.w, cb3[0].w, cb3[2].y
add r0.w, r0.w, -cb1[2].x
min r0.x, r0.x, r0.w
lt r0.x, r0.x, l(0.000000)
discard_nz r0.x
mul r1.xyz, r0.zzzz, v4.xyzx
mad r1.xyz, r0.yyyy, v3.xyzx, r1.xyzx
dp2 r0.x, r0.yzyy, r0.yzyy
add r0.x, -r0.x, l(1.000000)
max r0.x, r0.x, l(0.000000)
sqrt r0.x, r0.x
movc r0.yzw, v6.xxxx, v2.xxyz, -v2.xxyz
mad r0.xyz, r0.xxxx, r0.yzwy, r1.xyzx
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mul o0.xyz, r0.wwww, r0.xyzx
mul r0.x, cb3[2].x, l(0.500000)
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)
ret 
// Approximately 31 instruction slots used
