//
// 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
// {
//
//   float4x4 g_mCloudsShadowsSpace;    // Offset:    0 Size:    64 [unused]
//   float4 g_vCloudsShadowDesc;        // Offset:   64 Size:    16 [unused]
//   float4 g_vDitherSettings;          // Offset:   80 Size:    16 [unused]
//   float4 specColor;                  // Offset:   96 Size:    16 [unused]
//   float4 ControlData;                // Offset:  112 Size:    16 [unused]
//   float4 difColor;                   // Offset:  128 Size:    16 [unused]
//   float4 ambient;                    // Offset:  144 Size:    16 [unused]
//   float4 g_vDefLightDir;             // Offset:  160 Size:    16 [unused]
//   float4 g_vDefLightColor;           // Offset:  176 Size:    16 [unused]
//   float4 g_vDefSpecColor;            // Offset:  192 Size:    16 [unused]
//   uint CS_FRONT;                     // Offset:  208 Size:     4 [unused]
//      = 0x00000000 
//   uint CS_RIGHT;                     // Offset:  212 Size:     4 [unused]
//      = 0x00000001 
//   uint CS_BACK;                      // Offset:  216 Size:     4 [unused]
//      = 0x00000002 
//   uint CS_LEFT;                      // Offset:  220 Size:     4 [unused]
//      = 0x00000003 
//   uint CS_TOP;                       // Offset:  224 Size:     4 [unused]
//      = 0x00000004 
//   uint CS_BOTTOM;                    // Offset:  228 Size:     4 [unused]
//      = 0x00000005 
//   float4 g_vAmbientSettings;         // Offset:  240 Size:    16 [unused]
//   
//   struct
//   {
//       
//       float4 vDesc;                  // Offset:  256
//       float4 vFogLayerPlane;         // Offset:  272
//       float4 vFogLayerColor;         // Offset:  288
//       float4 vFogLayerSettings;      // Offset:  304
//       float4 vFogColor;              // Offset:  320
//       float4 vFogDistance;           // Offset:  336
//
//   } g_FogDesc;                       // Offset:  256 Size:    96 [unused]
//   float4 GrayK;                      // Offset:  352 Size:    16 [unused]
//      = 0x3eaa7efa 0x3eaa7efa 0x3eaa7efa 0x00000000 
//   float4x4 viewproj;                 // Offset:  368 Size:    64
//   float4 g_vCamPos;                  // Offset:  432 Size:    16
//   float4 UVSize;                     // Offset:  448 Size:    16
//   float4 PIConst;                    // Offset:  464 Size:    16 [unused]
//      = 0x40c90e56 0x3e22fabe 0x3f22f41b 0x3fc91687 
//   float4 Threshold;                  // Offset:  480 Size:    16 [unused]
//   float4 g_vExclusionMask;           // Offset:  496 Size:    16 [unused]
//      = 0x3f800000 0x3f800000 0x3f800000 0x3f800000 
//   float4 Constraints;                // Offset:  512 Size:    16
//   float4 GlobalOffset;               // Offset:  528 Size:    16
//   float4 SunData;                    // Offset:  544 Size:    16 [unused]
//   float4 Mask[4];                    // Offset:  560 Size:    64 [unused]
//      = 0x00000000 0x00000000 0x00000000 0x3f800000 
//        0x00000000 0x00000000 0x3f800000 0x00000000 
//        0x00000000 0x3f800000 0x00000000 0x00000000 
//        0x3f800000 0x00000000 0x00000000 0x00000000 
//
// }
//
// cbuffer CBHeightConst
// {
//
//   float4 HeightConst[64];            // Offset:    0 Size:  1024
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// $Globals                          cbuffer      NA          NA    0        1
// CBHeightConst                     cbuffer      NA          NA    1        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xy          0     NONE   float   xy  
// POSITION                 1   xyzw        1     NONE   float   xyzw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xy          1     NONE   float   xy  
// COLOR                    0   xyzw        2     NONE   float   xyzw
//
vs_4_0
dcl_constantbuffer cb0[34], immediateIndexed
dcl_constantbuffer cb1[64], dynamicIndexed
dcl_input v0.xy
dcl_input v1.xyzw
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_output o2.xyzw
// dcl_temps updated : previous = dcl_temps 2
dcl_temps 5
// added 3dmigoto declaration
dcl_resource_texture1d (float,float,float,float) t120
ld_indexable(texture1d)(float,float,float,float) r3.xyzw, l(0, 0, 0, 0), t120.xyzw
mov r4.x, r3.w
mov r4.y, r3.w
mov r4.zw, l(1.0, 1.0)
// end of 3dmigoto declaration
div r0.x, v0.x, cb0[28].z
add r0.x, r0.x, l(0.000100)
round_ni r0.z, r0.x
mad r0.y, -r0.z, cb0[28].z, v0.x
add r0.y, r0.y, l(0.000100)
round_ni r0.x, r0.y
mul r0.xz, r0.xxzx, cb0[28].wwww
ftou r0.w, v0.y
dp4 r0.y, cb1[r0.w + 0].xyzw, v1.xyzw
add r1.xyz, r0.xyzx, cb0[33].xyzx
mad r0.xy, -r0.xzxx, cb0[28].xxxx, cb0[28].yyyy
add o1.xy, r0.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
mov r1.w, l(1.000000)
// replacing matrix usage :dp4 o0.x, r1.xyzw, cb0[23].xyzw
dp4 r2.x, r1.xyzw, cb0[23].xyzw
mul o0.x, r2.x, r4.x
// replacing matrix usage :dp4 o0.y, r1.xyzw, cb0[24].xyzw
dp4 r2.y, r1.xyzw, cb0[24].xyzw
mul o0.y, r2.y, r4.y
dp4 o0.z, r1.xyzw, cb0[25].xyzw
dp4 o0.w, r1.xyzw, cb0[26].xyzw
add r0.xyz, -r1.xyzx, cb0[27].xyzx
dp3 r0.x, r0.xyzx, r0.xyzx
sqrt r0.x, r0.x
add r0.x, r0.x, -cb0[32].x
mul r0.x, r0.x, cb0[32].y
mov_sat o2.xyzw, r0.xxxx
ret 
// Approximately 24 instruction slots used
