// asmtool.py -I ../.. --auto-fix-vertex-halo --fix-unusual-halo-with-inconsistent-w-optimisation --fix-unity-reflection --fix-unity-frustum-world --only-autofixed 0386d90378103a70-vs.txt
// 3DMigoto: 0386d90378103a70 |    Unity headers extracted from WaterShader.shader
//    Shader "Water Shader" {
//      Properties {
//       _BumpAmt ("Distortion", Range(0,128)) = 10
//       _MainTex ("Tint Color (RGB)", 2D) = "white" { }
//       _BumpMap ("Normalmap", 2D) = "bump" { }
//       _BlurAmount ("Blur Amount", Float) = 1
//       _BlendColor ("Blend Color", Color) = (1,1,1,0)
//      }
//      SubShader 1/1 {
//        Tags { "QUEUE"="Transparent" "RenderType"="Transparent" }
//        Pass 1/1 {
//          Name "BASE"
//          Tags { "LIGHTMODE"="Always" "QUEUE"="Transparent" "RenderType"="Transparent" }
//          Cull Off
//          Blend SrcAlpha OneMinusSrcAlpha
//          GpuProgramID 50282
//          Program "vp" {
//            SubProgram "d3d11 " {
//              GpuProgramIndex 1
//            }
//          }
//        }
//      }
//    }
//
// Unity 5.3 headers extracted from WaterShader.shader.decompressed:
//   API d3d11
//   Shader model vs_4_0
//   undeciphered1: 201509030 6 0 0
//   undeciphered2: 1 0 1 0 0
//   undeciphered3: 9 2 0 0 3 4
//   ConstBuffer "UnityPerDraw" 352
//   Matrix 0 [glstate_matrix_mvp]
//   BindCB "UnityPerDraw" 0
//
// Headers extracted with DarkStarSword's extract_unity53_shaders.py
// https://github.com/DarkStarSword/3d-fixes

//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.2 on Mon Jul 23 23:41:50 2018
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// TEXCOORD                 0   xy          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   xy          2     NONE   float   xy
// TEXCOORD                 2     zw        2     NONE   float     zw
//
vs_4_0
dcl_constantbuffer cb0[4], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xy
dcl_output o2.zw
dcl_temps 2

// 3DMigoto StereoParams:
dcl_resource_texture2d (float,float,float,float) t125

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

mul r0.xyzw, v0.yyyy, cb0[1].xyzw
mad r0.xyzw, cb0[0].xyzw, v0.xxxx, r0.xyzw
mad r0.xyzw, cb0[2].xyzw, v0.zzzz, r0.xyzw
mad r0.xyzw, cb0[3].xyzw, v0.wwww, r0.xyzw
mov o0.xyzw, r0.xyzw

// Automatic vertex shader halo fix inserted with DarkStarSword's asmtool.py:
// asmtool.py -I ../.. --auto-fix-vertex-halo --fix-unusual-halo-with-inconsistent-w-optimisation --fix-unity-reflection --fix-unity-frustum-world --only-autofixed 0386d90378103a70-vs.txt
ne r1.w, r0.w, l(1.0)
if_nz r1.w
  add r1.w, r0.w, -r1.y
  mad r0.x, r1.w, r1.x, r0.x
endif

mad r0.xy, r0.xyxx, l(1.000000, -1.000000, 0.000000, 0.000000), r0.wwww
mov o1.zw, r0.zzzw
mul o1.xy, r0.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
mov o2.xyzw, v1.xyxy
ret
// Approximately 0 instruction slots used