// asmtool.py -I ../.. --auto-fix-vertex-halo --fix-unusual-halo-with-inconsistent-w-optimisation --fix-unity-reflection --fix-unity-frustum-world --only-autofixed 32b8ad75e4134830-vs.txt
// 3DMigoto: 32b8ad75e4134830 | Matched 12 variants of 2 shaders: Kyoto/VFX/Transparent Diffuse Additive Lit, Kyoto/VFX/Transparent Diffuse Lit
//
// 03f:    Unity headers extracted from TransparentDiffuseAdditiveLit.shader
// fc0:    Unity headers extracted from TransparentDiffuseLit.shader
// 03f:    Shader "Kyoto/VFX/Transparent Diffuse Additive Lit" {
// fc0:    Shader "Kyoto/VFX/Transparent Diffuse Lit" {
//           Properties {
//           [HideInInspector]  _Mode ("__mode", Float) = 2.000000
//           [HideInInspector]  _SrcBlend ("__src", Float) = 1.000000
//           [HideInInspector]  _DstBlend ("__dst", Float) = 0.000000
//            _Color ("Color", Color) = (1.000000,1.000000,1.000000,1.000000)
//            _MainTex ("Albedo", 2D) = "white" { }
//            _DepthFeatherAmount ("Depth Feather", Range(0.000000,500.000000)) = 1.000000
//            _ShadowProjectionAlphaModulation ("Shadow Alpha Projection Offset", Range(1.000000,20.000000)) = 5.000000
//            _ShadowBias ("Shadow Bias", Range(0.000000,0.900000)) = 0.100000
//            _NormalDirectionalStrength ("Directional light NdotL strength", Range(0.000000,1.000000)) = 1.000000
//            _WorldSpaceNormalOverrideBias ("World Space Normal Override Bias", Range(0.000000,1.000000)) = 0.000000
//            _WorldSpaceNormalOverrideDir ("World Space Normal Direction", Vector) = (0.000000,1.000000,0.000000,1.000000)
//           }
//           Fallback Off
//           SubShader 1/1 {
//             Tags { "QUEUE"="Transparent" "IGNOREPROJECTOR"="true" }
// fc0:        Pass 1/2 {
// 03f:        Pass 1/3 {
//               Name "FORWARD"
//               Tags { "LIGHTMODE"="ForwardBase" "QUEUE"="Transparent" "IGNOREPROJECTOR"="true" "SHADOWSUPPORT"="true" }
//               ZWrite Off
//               Cull Off
//               Blend SrcAlpha OneMinusSrcAlpha
// 03f:          GpuProgramID 32712
// fc0:          GpuProgramID 58409
//               Program "vp" {
//                 SubProgram "d3d11 " {
// 082:              GpuProgramIndex 17
// 041:              GpuProgramIndex 2
// 104:              GpuProgramIndex 32
// 208:              GpuProgramIndex 47
// 410:              GpuProgramIndex 62
// 820:              GpuProgramIndex 77
//                 }
//               }
//             }
//           }
//         }
//
// 03f: Unity 5.3 headers extracted from TransparentDiffuseAdditiveLit.shader.decompressed:
// fc0: Unity 5.3 headers extracted from TransparentDiffuseLit.shader.decompressed:
//        API d3d11
//        Shader model vs_4_0
//        undeciphered1: 201510240 20 0 0
// 410:   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" }
// 082:   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DIRLIGHTMAP_COMBINED" "DYNAMICLIGHTMAP_OFF" }
// 820:   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" }
// 104:   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DIRLIGHTMAP_SEPARATE" "DYNAMICLIGHTMAP_OFF" }
// 208:   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "UNITY_HDR_ON" }
// 041:   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" }
//        undeciphered2: 1 0 4 0 0 0
//        undeciphered3: 15 4 0 0 2 1 1 2 3 4
//        ConstBuffer "$Globals" 288
//        Vector 224 [_MainTex_ST]
//        ConstBuffer "UnityPerCamera" 144
//        Vector 64 [_WorldSpaceCameraPos] 3
//        Vector 80 [_ProjectionParams]
//        ConstBuffer "UnityPerCameraRare" 352
//        Matrix 288 [unity_CameraToWorld]
//        ConstBuffer "UnityPerDraw" 352
//        Matrix 0 [glstate_matrix_mvp]
//        Matrix 64 [glstate_matrix_modelview0]
//        BindCB "$Globals" 0
//        BindCB "UnityPerCamera" 1
//        BindCB "UnityPerCameraRare" 2
//        BindCB "UnityPerDraw" 3
//
// 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.12 on Thu Dec 06 16:58:47 2018
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyzw
// NORMAL                   0   xyz         1     NONE   float   xyz
// TEXCOORD                 0   xy          2     NONE   float   xy
// TEXCOORD                 1   xy          3     NONE   float
// COLOR                    0   xyzw        4     NONE   float   xyzw
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xyz         1     NONE   float   xyz
// TEXCOORD                 1   xyzw        2     NONE   float   xyzw
// TEXCOORD                 2   xyzw        3     NONE   float   xyzw
// TEXCOORD                 3   xyzw        4     NONE   float   xyzw
// TEXCOORD                 4   xyzw        5     NONE   float   xyzw
// TEXCOORD                 5   xyzw        6     NONE   float   xyzw
// TEXCOORD                 6   xyz         7     NONE   float   xyz
// TEXCOORD                 7   xyzw        8     NONE   float   xyzw
// TEXCOORD                 8   xyzw        9     NONE   float   xyzw
// TEXCOORD                 9   xyzw       10     NONE   float   xyzw
// COLOR                    0   xyzw       11     NONE   float   xyzw
//
vs_4_0
dcl_constantbuffer cb0[15], immediateIndexed
dcl_constantbuffer cb1[9], immediateIndexed
dcl_constantbuffer cb2[22], immediateIndexed
dcl_constantbuffer cb3[22], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xyz
dcl_input v2.xy
dcl_input v4.xyzw
dcl_output_siv o0.xyzw, position
dcl_output o1.xyz
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_output o6.xyzw
dcl_output o7.xyz
dcl_output o8.xyzw
dcl_output o9.xyzw
dcl_output o10.xyzw
dcl_output o11.xyzw
dcl_temps 5

// 3DMigoto StereoParams:
dcl_resource_texture2d (float,float,float,float) t125
dcl_constantbuffer cb10[4], immediateIndexed

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


// Unity reflection/specular 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 32b8ad75e4134830-vs.txt

mul r3.w, -r3.x, r3.y
mad r4.xyz, -r3.wwww, cb10[0].xyzw, cb1[4].xyzw

mul r0.xyzw, v0.yyyy, cb3[1].xyzw
mad r0.xyzw, cb3[0].xyzw, v0.xxxx, r0.xyzw
mad r0.xyzw, cb3[2].xyzw, v0.zzzz, r0.xyzw
mad r0.xyzw, cb3[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 32b8ad75e4134830-vs.txt
ne r3.w, r0.w, l(1.0)
if_nz r3.w
  add r3.w, r0.w, -r3.y
  mad r0.x, r3.w, r3.x, r0.x
endif

mul r1.xyzw, v0.xyzw, l(1.000000, 1.000000, -1.000000, 1.000000)
mul r2.xyz, r1.yyyy, cb2[19].xyzx
mad r2.xyz, cb2[18].xyzx, r1.xxxx, r2.xyzx
mad r1.xyz, cb2[20].xyzx, r1.zzzz, r2.xyzx
mad r1.xyz, cb2[21].xyzx, r1.wwww, r1.xyzx
add o1.xyz, r1.xyzx, -r4.xyzx
mov o7.xyz, r1.xyzx
mul r1.x, r0.y, cb1[5].x
mul r1.w, r1.x, l(0.500000)
mul r1.xz, r0.xxwx, l(0.500000, 0.000000, 0.500000, 0.000000)
add r0.xy, r1.zzzz, r1.xwxx
mov o2.xyw, r0.xyxw
mul r1.x, v0.y, cb3[5].z
mad r1.x, cb3[4].z, v0.x, r1.x
mad r1.x, cb3[6].z, v0.z, r1.x
add r1.x, r1.x, cb3[7].z
mov o2.z, -r1.x
mov o3.xyzw, l(0,0,0,0)
mov o4.xyzw, l(0,0,0,0)
mov o5.xyz, v1.xyzx
mov o5.w, l(0)
mov o6.xyzw, l(0,0,0,0)
mov o8.xyzw, r0.xyzw
mov o10.xyzw, r0.xyzw
mad o9.xy, v2.xyxx, cb0[14].xyxx, cb0[14].zwzz
mov o9.zw, l(0,0,0,0)
mov o11.xyzw, v4.xyzw
ret
// Approximately 0 instruction slots used