// asmtool.py --auto-fix-vertex-halo -i --only-autofixed 0e1c111d6f5f777b-vs.txt
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//   using 3Dmigoto v1.3.4 on Mon Mar 05 05:00:58 2018
//
//
// Buffer Definitions:
//
// cbuffer vector_register_block
// {
//
//   float3 gEffectHemisphereVector;    // Offset:    0 Size:    12 [unused]
//   float3 gEffectHemisphereColor0;    // Offset:   16 Size:    12 [unused]
//   float3 gEffectHemisphereColor1;    // Offset:   32 Size:    12 [unused]
//   row_major float3x3 gEffectLightDirection;// Offset:   48 Size:    44 [unused]
//   row_major float3x3 gEffectLightColorDir;// Offset:   96 Size:    44 [unused]
//   float4 gEffectLightPosition[4];    // Offset:  144 Size:    64 [unused]
//   float4 gEffectLightColorPoint[4];  // Offset:  208 Size:    64 [unused]
//   row_major float4x4 gEffectWorldViewProj;// Offset:  480 Size:    64
//   row_major float4x4 gEffectShadingMatrix;// Offset:  544 Size:    64 [unused]
//   float3 gEffectEyePosition;         // Offset:  608 Size:    12 [unused]
//   float4 gEffectUVOffset;            // Offset:  624 Size:    16
//   float4 gEffectConstantColor;       // Offset:  640 Size:    16 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// vector_register_block             cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyz         0     NONE   float   xyz
// TEXCOORD                 0   xyzw        1     NONE   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 1   xyzw        2     NONE   float   xyzw
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[40], immediateIndexed
dcl_input v0.xyz
dcl_input v1.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_temps 3
// 3DMigoto StereoParams:
dcl_resource_texture2d (float,float,float,float) t125

ld_indexable(texture2d)(float,float,float,float) r2.xyzw, l(0, 0, 0, 0), t125.xyzw

mul r0.xyzw, v0.yyyy, cb0[31].xyzw
mad r0.xyzw, v0.xxxx, cb0[30].xyzw, r0.xyzw
mad r0.xyzw, v0.zzzz, cb0[32].xyzw, r0.xyzw
add r0.xyzw, r0.xyzw, cb0[33].xyzw
mov o0.xyzw, r0.xyzw

// Automatic vertex shader halo fix inserted with DarkStarSword's asmtool.py:
// asmtool.py --auto-fix-vertex-halo -i --only-autofixed 0e1c111d6f5f777b-vs.txt
ne r2.w, r0.w, l(1.0)
if_nz r2.w
  add r2.w, r0.w, -r2.y
  mad r0.x, r2.w, r2.x, r0.x
endif

mul r1.x, v1.y, l(21.991150)
div r1.x, r1.x, r0.w
sincos o1.w, null, r1.x
add o1.z, v1.x, l(-0.500000)
add o1.xy, v1.xyxx, cb0[39].xyxx
mul r1.xyz, r0.xywx, l(0.500000, -0.500000, 0.500000, 0.000000)
mov o2.zw, r0.zzzw
add o2.xy, r1.zzzz, r1.xyxx
ret
// Approximately 14 instruction slots used