// asmtool.py -I ../.. --auto-fix-vertex-halo --fix-unusual-halo-with-inconsistent-w-optimisation --fix-unity-reflection --fix-unity-frustum-world --only-autofixed 44282da08e925292-vs.txt
// 3DMigoto: 44282da08e925292 | Matched 6 variants of 1 shaders: ProBuilder/Standard Vertex Color
//
//        Unity headers extracted from ProBuilder_Standard Vertex Color
//        Shader "ProBuilder/Standard Vertex Color" {
//          Fallback "Standard"
//          SubShader 1/1 {
//            Tags { "RenderType"="Opaque" }
//            Pass 2/3 {
//              Name "FORWARD_DELTA"
//              Tags { "LIGHTMODE"="FORWARDADD" "RenderType"="Opaque" "SHADOWSUPPORT"="true" }
//              Program "vp" {
//                SubProgram "d3d11" {
//                }
//              }
//            }
//          }
//        }
//
//     Unity 5.3 headers extracted from ProBuilder_Standard Vertex Color:
//       API d3d11
//       Shader model vs_4_0
//       undeciphered1: 201609010 30 0 0
//       undeciphered1a: 4
// 04:   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "LIGHTMAP_OFF" }
// 08:   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_ON" "LIGHTMAP_OFF" }
// 01:   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "LIGHTMAP_OFF" }
// 10:   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "DYNAMICLIGHTMAP_OFF" "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" }
// 02:   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "DYNAMICLIGHTMAP_ON" "DIRLIGHTMAP_OFF" "LIGHTMAP_OFF" }
// 20:   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "DYNAMICLIGHTMAP_ON" "LIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" }
//       undeciphered2: 1 0 3 0 0 0
//       undeciphered3: 191 7 0 0 1 2 7 8 3 4 4 5 5 6 2 1
//       ConstBuffer "UnityPerCamera" 144
//       Vector 80 [_ProjectionParams]
//       ConstBuffer "UnityPerDraw" 160
//       Matrix 0 [unity_ObjectToWorld]
//       Matrix 64 [unity_WorldToObject]
//       ConstBuffer "UnityPerFrame" 384
//       Matrix 272 [unity_MatrixVP]
//       BindCB "UnityPerCamera" 0
//       BindCB "UnityPerDraw" 1
//       BindCB "UnityPerFrame" 2
//
// Headers extracted with DarkStarSword's extract_unity55_shaders.py
// https://github.com/DarkStarSword/3d-fixes

//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Sun Apr 21 17:54:46 2019
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// NORMAL                   0   xyz         1     NONE   float   xyz
// TANGENT                  0   xyzw        2     NONE   float   xyzw
// TEXCOORD                 0   xy          3     NONE   float   xy
// TEXCOORD                 1   xy          4     NONE   float   xy
// TEXCOORD                 2   xy          5     NONE   float   xy
// COLOR                    0   xyzw        6     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
// TEXCOORD                 1     zw        1     NONE   float     zw
// TEXCOORD                 2   xy          2     NONE   float   xy
// TEXCOORD                 3   xyzw        3     NONE   float   xyzw
// TEXCOORD                 4   xyz         4     NONE   float   xyz
// TEXCOORD                 5   xyz         5     NONE   float   xyz
// TEXCOORD                 6   xyz         6     NONE   float   xyz
// COLOR                    0   xyzw        7     NONE   float   xyzw
// TEXCOORD                 7   xyzw        8     NONE   float   xyzw
//
vs_4_0
dcl_constantbuffer cb0[6], immediateIndexed
dcl_constantbuffer cb1[7], immediateIndexed
dcl_constantbuffer cb2[21], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xyz
dcl_input v2.xyzw
dcl_input v3.xy
dcl_input v4.xy
dcl_input v5.xy
dcl_input v6.xyzw
dcl_output_siv o0.xyzw, position
dcl_output o1.xy
dcl_output o1.zw
dcl_output o2.xy
dcl_output o3.xyzw
dcl_output o4.xyz
dcl_output o5.xyz
dcl_output o6.xyz
dcl_output o7.xyzw
dcl_output o8.xyzw
dcl_temps 5

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

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

mul r0.xyzw, v0.yyyy, cb1[1].xyzw
mad r0.xyzw, cb1[0].xyzw, v0.xxxx, r0.xyzw
mad r0.xyzw, cb1[2].xyzw, v0.zzzz, r0.xyzw
add r1.xyzw, r0.xyzw, cb1[3].xyzw
mad o3.xyzw, cb1[3].xyzw, v0.wwww, r0.xyzw
mul r0.xyzw, r1.yyyy, cb2[18].xyzw
mad r0.xyzw, cb2[17].xyzw, r1.xxxx, r0.xyzw
mad r0.xyzw, cb2[19].xyzw, r1.zzzz, r0.xyzw
mad r0.xyzw, cb2[20].xyzw, r1.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 44282da08e925292-vs.txt
ne r4.w, r0.w, l(1.0)
if_nz r4.w
  add r4.w, r0.w, -r4.y
  mad r0.x, r4.w, r4.x, r0.x
endif

mov o1.xy, v3.xyxx
mov o1.zw, v4.xxxy
mov o2.xy, v5.xyxx
dp3 r1.x, v1.xyzx, cb1[4].xyzx
dp3 r1.y, v1.xyzx, cb1[5].xyzx
dp3 r1.z, v1.xyzx, cb1[6].xyzx
dp3 r1.w, r1.xyzx, r1.xyzx
rsq r1.w, r1.w
mul r1.xyz, r1.wwww, r1.xyzx
mov o4.xyz, r1.xyzx
mul r2.xyz, v2.yyyy, cb1[1].xyzx
mad r2.xyz, cb1[0].xyzx, v2.xxxx, r2.xyzx
mad r2.xyz, cb1[2].xyzx, v2.zzzz, r2.xyzx
dp3 r1.w, r2.xyzx, r2.xyzx
rsq r1.w, r1.w
mul r2.xyz, r1.wwww, r2.xyzx
mov o5.xyz, r2.xyzx
mul r3.xyz, r1.zxyz, r2.yzxy
mad r1.xyz, r1.yzxy, r2.zxyz, -r3.xyzx
mul r1.xyz, r1.xyzx, v2.wwww
dp3 r1.w, r1.xyzx, r1.xyzx
rsq r1.w, r1.w
mul o6.xyz, r1.wwww, r1.xyzx
mov o7.xyzw, v6.xyzw
mul r0.y, r0.y, cb0[5].x
mul r1.xzw, r0.xxwy, l(0.500000, 0.000000, 0.500000, 0.500000)
mov o8.zw, r0.zzzw
add o8.xy, r1.zzzz, r1.xwxx
ret
// Approximately 0 instruction slots used