// CRC32: B3D73061 | Unity headers extracted from AlphaTest-VertexLit.shader
// Shader "Legacy Shaders/Transparent/Cutout/VertexLit" {
//   Properties {
//    _Color ("Main Color", Color) = (1,1,1,1)
//    _SpecColor ("Spec Color", Color) = (1,1,1,0)
//    _Emission ("Emissive Color", Color) = (0,0,0,0)
//    _Shininess ("Shininess", Range(0.1,1)) = 0.7
//    _MainTex ("Base (RGB) Trans (A)", 2D) = "white" { }
//    _Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
//   }
//   SubShader 1/1 {
//     LOD 100
//     Tags { "QUEUE"="AlphaTest" "IGNOREPROJECTOR"="true" "RenderType"="TransparentCutout" }
//     Pass 4/4 {
//       Name "CASTER"
//       Tags { "LIGHTMODE"="SHADOWCASTER" "SHADOWSUPPORT"="true" "QUEUE"="AlphaTest" "IGNOREPROJECTOR"="true" "RenderType"="TransparentCutout" }
//       GpuProgramID 27933
//       Program "vp" {
//         SubProgram "d3d9 " {
//           Keywords { "SHADOWS_DEPTH" }
//           Bind "vertex" Vertex
//           Bind "normal" Normal
//           Bind "texcoord" TexCoord0
//           Matrix 8 [_Object2World] 3
//           Matrix 11 [_World2Object] 3
//           Matrix 0 [glstate_matrix_mvp]
//           Matrix 4 [unity_MatrixVP]
//           Vector 16 [_MainTex_ST]
//           Vector 14 [_WorldSpaceLightPos0]
//           Vector 15 [unity_LightShadowBias]
//         }
//       }
//     }
//   }
// }
// 
// Headers extracted with DarkStarSword's extract_unity_shaders.py
// https://raw.githubusercontent.com/DarkStarSword/3d-fixes/master/extract_unity_shaders.py

    vs_3_0 // Converted from vs_2_0 with DarkStarSword's shadertool.py
dcl_fog o9 // Inserted by shadertool.py for fog compatibility on upgrade from vs_2_0 to vs_3_0
    def c17, 1, 0, 0, 0
    dcl_position v0
    dcl_normal v1
    dcl_texcoord v2

dcl_texcoord o0
dcl_texcoord1 o1
dcl_position o2


def c220, 0, 1, 0.0625, 0.5
dcl_2d s0

    mad o1.xy, v2, c16, c16.zwzw
    mul r0.x, c15.z, c15.z
    slt r0.x, -r0.x, r0.x
    mul r0.yzw, v1.y, c12.xxyz
    mad r0.yzw, c11.xxyz, v1.x, r0
    mad r0.yzw, c13.xxyz, v1.z, r0
    nrm r1.xyz, r0.yzww
    mad r2, v0.xyzx, c17.xxxy, c17.yyyx
    dp4 r3.x, c8, r2
    dp4 r3.y, c9, r2
    dp4 r3.z, c10, r2
    mad r0.yzw, r3.xxyz, -c14.w, c14.xxyz
    nrm r4.xyz, r0.yzww
    dp3 r0.y, r1, r4
    mad r0.y, r0.y, -r0.y, c17.x
    rsq r0.y, r0.y
    rcp r0.y, r0.y
    mul r0.y, r0.y, c15.z
    mad r1.xyz, r1, -r0.y, r3
    mov r1.w, c17.x
    dp4 r3.x, c4, r1
    dp4 r3.y, c5, r1
    dp4 r3.z, c6, r1
    dp4 r3.w, c7, r1
    dp4 r1.x, c0, r2
    dp4 r1.y, c1, r2
    dp4 r1.z, c2, r2
    dp4 r1.w, c3, r2
    lrp r2, r0.x, r3, r1

mov o2, r2 // Relocated from line 88 with shadertool.py

// Automatic vertex shader halo fix inserted with DarkStarSword's shadertool.py:
// shadertool.py -I /home/ian/3d-fixes/TheLongDark/ --auto-fix-vertex-halo --only-autofixed --add-fog-on-sm3-update Legacy Shaders_Transparent_Cutout_VertexLit/vp/B3D73061.txt
texldl r31, c220.z, s0
add r31.w, r2.w, -r31.y
mad r2.x, r31.w, r31.x, r2.x

    rcp r0.x, r2.w
    mul r0.x, r0.x, c15.x
    max r0.x, r0.x, c17.y
    min r0.x, r0.x, c17.x
    add r0.x, r0.x, r2.z
    max r0.y, r0.x, c17.y
    lrp r2.z, c15.y, r0.y, r0.x
    mov o0, r2

//     mov o2, r2 // Relocated to line 80 with shadertool.py
mov o2.z, r2 // Inserted by shadertool.py

mov o9, r2.z // Inserted by shadertool.py for fog compatibility on upgrade from vs_2_0 to vs_3_0
