//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.2.67 on Mon Jan 01 13:11:46 2018
//
//
// Buffer Definitions: 
//
// cbuffer $Globals
// {
//
//   float4 specColor;                  // Offset:    0 Size:    16 [unused]
//   float4 ControlData;                // Offset:   16 Size:    16 [unused]
//   float4 difColor;                   // Offset:   32 Size:    16 [unused]
//   float4 ambient;                    // Offset:   48 Size:    16
//   float4 lightCount;                 // Offset:   64 Size:    16 [unused]
//   float4 g_avLightPos;               // Offset:   80 Size:    16 [unused]
//   float4 g_avLightColor;             // Offset:   96 Size:    16
//   float4 g_avConeDir;                // Offset:  112 Size:    16 [unused]
//   float4 g_vAmbientSettings;         // Offset:  128 Size:    16 [unused]
//   float3 g_vOffset;                  // Offset:  144 Size:    12 [unused]
//   float4 g_vCamPos;                  // Offset:  160 Size:    16 [unused]
//   float4 g_vState;                   // Offset:  176 Size:    16 [unused]
//   float4 g_vSettings;                // Offset:  192 Size:    16 [unused]
//   float3 g_vWind;                    // Offset:  208 Size:    12 [unused]
//      = 0x00000000 0x00000000 0x00000000 
//   float4x4 g_mViewProj;              // Offset:  224 Size:    64 [unused]
//   float4 g_avPData[64];              // Offset:  288 Size:  1024 [unused]
//   float4 g_vFixedOrientation;        // Offset: 1312 Size:    16 [unused]
//   float4 ExPos[4];                   // Offset: 1328 Size:    64 [unused]
//   float4 ExRad[4];                   // Offset: 1392 Size:    64 [unused]
//   float4 g_vExVolumeSettings;        // Offset: 1456 Size:    16
//   float4 g_vExVolumeRect;            // Offset: 1472 Size:    16 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// VolumeDepthSampler                sampler      NA          NA    0        1
// VolumeAlphaSampler                sampler      NA          NA    1        1
// DiffuseSampler                    sampler      NA          NA    2        1
// NormalSampler                     sampler      NA          NA    3        1
// DiffuseSampler                    texture  float4          2d    0        1
// NormalSampler                     texture  float4          2d    1        1
// VolumeDepthSampler                texture  float4          2d    2        1
// VolumeAlphaSampler                texture  float4          2d    3        1
// $Globals                          cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float       
// COLOR                    0   xyzw        1     NONE   float   xyzw
// COLOR                    1   xyz         2     NONE   float   xyz 
// TEXCOORD                 0   xy          3     NONE   float   xy  
// TEXCOORD                 1     zw        3     NONE   float     zw
// TEXCOORD                 2   xyzw        4     NONE   float   xy w
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_4_0
dcl_constantbuffer cb0[92], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, 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_input_ps linear v1.xyzw
dcl_input_ps linear v2.xyz
dcl_input_ps linear v3.xy
dcl_input_ps linear v3.zw
dcl_input_ps linear v4.xyw
dcl_output o0.xyzw
dcl_temps 3
sample r0.xyzw, v3.xyxx, t0.xyzw, s2
sample r1.xyzw, v3.zwzz, t1.xyzw, s3
mad r1.xyz, r1.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
ge r1.w, cb0[6].x, l(100.000000)
if_nz r1.w
  add r1.w, cb0[6].x, l(-100.000000)
else 
  mov r1.w, cb0[6].x
endif 
mad r2.xyz, v2.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
dp3 r1.x, r1.xyzx, r2.xyzx
max r1.x, r1.x, l(0.000000)
mul r2.x, r1.w, r1.x
mul r2.yz, r1.xxxx, cb0[6].yyzy
mul r1.xyz, cb0[3].xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
mad r1.xyz, r2.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), r1.xyzx
mul r0.xyzw, r0.xyzw, v1.xyzw
mul r0.xyz, r1.xyzx, r0.xyzx
add o0.xyz, r0.xyzx, r0.xyzx
div r0.xy, v4.xyxx, v4.wwww
lt r0.z, l(0.001000), r0.w
sample r1.xyzw, r0.xyxx, t2.xyzw, s0
sample r2.xyzw, r0.xyxx, t3.xyzw, s1
if_nz r0.z
  max r0.x, cb0[91].x, l(0.000000)
  mad r0.y, -r0.x, l(0.500000), r1.x
  mul r0.z, r2.w, r2.w
  add r0.y, -r0.y, v4.w
  div_sat r0.x, r0.y, r0.x
  mad r0.x, -r0.x, r0.z, l(1.000000)
  mul o0.w, r0.x, r0.w
else 
  mov o0.w, r0.w
endif 
ret 
// Approximately 35 instruction slots used
