// asmtool.py -I ../.. --auto-fix-vertex-halo --fix-unusual-halo-with-inconsistent-w-optimisation --fix-unity-reflection --fix-unity-frustum-world --only-autofixed 8894faad6cc8a649-vs.txt
// 3DMigoto: 8894faad6cc8a649 | Matched 2 variants of 2 shaders: FX/Alpha Blend Write To Alpha, FX/Texture Blur
//
// 2:    Unity headers extracted from AlphaBlendWriteToAlpha.shader
// 1:    Unity headers extracted from TextureBlur.shader
// 2:    Shader "FX/Alpha Blend Write To Alpha" {
// 1:    Shader "FX/Texture Blur" {
//         Properties {
//          _MainTex ("Base (RGB)", 2D) = "" { }
//          _Color ("Main Color", Color) = (1,1,1,1)
// 1:       _TintColor ("Tint Color", Color) = (1,1,1,1)
// 1:       _OutlineColor ("Outline Color", Color) = (1,1,1,0)
// 1:       _Multipliers ("Multipliers", Vector) = (1,1,1,1)
//         }
//         Fallback Off
//         SubShader 1/1 {
//           Tags { "QUEUE"="Transparent" "IGNOREPROJECTOR"="true" "RenderType"="Transparent" }
//           Pass 1/1 {
//             Tags { "QUEUE"="Transparent" "IGNOREPROJECTOR"="true" "RenderType"="Transparent" }
// 1:          ZTest Always
//             ZWrite Off
//             Cull Off
//             Blend One OneMinusSrcAlpha
// 1:          ColorMask RGB
// 2:          GpuProgramID 13973
// 1:          GpuProgramID 64558
//             Program "vp" {
//               SubProgram "d3d11 " {
//                 GpuProgramIndex 1
//               }
//             }
//           }
//         }
//       }
//
// 2: Unity 5.3 headers extracted from AlphaBlendWriteToAlpha.shader.decompressed:
// 1: Unity 5.3 headers extracted from TextureBlur.shader.decompressed:
//      API d3d11
//      Shader model vs_4_0
//      undeciphered1: 201509030 24 0 0
//      undeciphered2: 1 0 3 0 0
//      undeciphered3: 9 2 0 0 3 4
// 2:   ConstBuffer "$Globals" 144
// 1:   ConstBuffer "$Globals" 192
//      Float 96 [_FogGradientRange]
//      Vector 112 [_MainTex_ST]
//      ConstBuffer "UnityPerDraw" 352
//      Matrix 0 [glstate_matrix_mvp]
//      Matrix 192 [_Object2World]
//      ConstBuffer "UnityPerFrame" 256
//      Vector 64 [glstate_lightmodel_ambient]
//      BindCB "$Globals" 0
//      BindCB "UnityPerDraw" 1
//      BindCB "UnityPerFrame" 2
//
// 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:45:32 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   xy          1     NONE   float   xy
// TEXCOORD                 4     z         1     NONE   float     z
// TEXCOORD                 5      w        1     NONE   float      w
//
vs_4_0
dcl_constantbuffer cb0[8], immediateIndexed
dcl_constantbuffer cb1[16], immediateIndexed
dcl_constantbuffer cb2[5], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xy
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_output o1.z
dcl_output o1.w
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.x, v0.y, cb1[13].z
mad r0.x, cb1[12].z, v0.x, r0.x
mad r0.x, cb1[14].z, v0.z, r0.x
mad r0.x, cb1[15].z, v0.w, r0.x
add r0.y, r0.x, l(200.000000)
mul r1.xyzw, v0.yyyy, cb1[1].xyzw
mad r1.xyzw, cb1[0].xyzw, v0.xxxx, r1.xyzw
mad r1.xyzw, cb1[2].xyzw, v0.zzzz, r1.xyzw
mad r1.xyzw, cb1[3].xyzw, v0.wwww, r1.xyzw

// Relocated to here with asmtool.py
mov o0.xyw, r1.xyxw

// 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 8894faad6cc8a649-vs.txt
ne r2.w, r1.w, l(1.0)
if_nz r2.w
  add r2.w, r1.w, -r2.y
  mad r1.x, r2.w, r2.x, r1.x
endif

mul r0.y, r0.y, r1.w
mul o0.z, r0.y, l(0.000833333354)

// mov o0.xyw, r1.xyxw // Relocated from here with asmtool.py

dp4 r0.y, r1.xyzw, r1.xyzw
sqrt r0.y, r0.y
mul r0.zw, cb2[4].wwww, l(0.000000, 0.000000, 0.200000, 4.060000)
round_ni r0.w, r0.w
add r0.w, -r0.w, l(1.000000)
mul r0.z, r0.w, r0.z
mul r0.y, r0.z, r0.y
exp r0.y, -|r0.y|
mad o1.z, -r0.y, r0.y, l(1.000000)
add r0.y, cb0[6].x, cb0[6].x
div r0.x, r0.x, r0.y
add o1.w, r0.x, l(0.500000)
mad o1.xy, v1.xyxx, cb0[7].xyxx, cb0[7].zwzz
ret
// Approximately 0 instruction slots used