// CRC32: C20AD831 | Unity headers extracted from Terrain Block.shader
// Shader "Custom/Terrain Block" {
//   Properties {
//    _MainTex ("Wall Texture (RGB)", 2D) = "white" { }
//    _GroundTex ("Floor Texture (RGB)", 2D) = "white" { }
//    _CeilingTex ("Ceiling Texture (RGB)", 2D) = "white" { }
//    _EdgeTex ("Edge Texture", 2D) = "" { }
//    _WallGlossinessTex ("Wall Glossiness (R)", 2D) = "black" { }
//    _GroundGlossinessTex ("Floor Glossiness (R)", 2D) = "black" { }
//    _CeilingGlossinessTex ("Ceiling Glossiness (R)", 2D) = "black" { }
//    _EmissiveTex ("Emissive (RGB)", 2D) = "black" { }
//    _SpecularPower ("Specular Power", Float) = 1
//    _Tiling ("Tiling - width of texture in tiles", Float) = 8
//    _StretchDownwardUV ("Downward Texture Stretching", Range(0,1)) = 1
//    _OriginalPosition ("Internal Use Only", Vector) = (0,0,0,0)
//    _OriginalPositionOffset ("Internal Use Only", Vector) = (0,0,0,0)
//    _OriginalRotation ("Internal Use Only", Float) = 0
//   }
//   Fallback Off
//   SubShader 1/1 {
//     Tags { "RenderType"="Opaque" }
//     Pass 1/3 {
//       Name "FORWARD"
//       Tags { "LIGHTMODE"="ForwardBase" "SHADOWSUPPORT"="true" "RenderType"="Opaque" }
//       GpuProgramID 30851
//       Program "vp" {
//         SubProgram "d3d9 " {
//           Keywords { "DIRECTIONAL" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "LIGHTMAP_OFF" "SHADOWS_OFF" "VERTEXLIGHT_ON" }
//           Bind "vertex" Vertex
//           Bind "normal" Normal
//           Bind "texcoord" TexCoord0
//           Bind "texcoord1" TexCoord1
//           Matrix 8 [_Object2World] 3
//           Matrix 11 [_World2Object] 3
//           Matrix 4 [glstate_matrix_mvp]
//           Vector 31 [_EdgeTex_ST]
//           Vector 30 [_MainTex_ST]
//           Vector 26 [_OriginalPosition]
//           Vector 27 [_OriginalPositionOffset]
//           Float 28 [_OriginalRotation]
//           Float 25 [_StretchDownwardUV]
//           Float 29 [_ZI_LevelBottomBound]
//           Vector 17 [unity_4LightAtten0]
//           Vector 14 [unity_4LightPosX0]
//           Vector 15 [unity_4LightPosY0]
//           Vector 16 [unity_4LightPosZ0]
//           Vector 0 [unity_LightColor0]
//           Vector 1 [unity_LightColor1]
//           Vector 2 [unity_LightColor2]
//           Vector 3 [unity_LightColor3]
//           Vector 20 [unity_SHAb]
//           Vector 19 [unity_SHAg]
//           Vector 18 [unity_SHAr]
//           Vector 23 [unity_SHBb]
//           Vector 22 [unity_SHBg]
//           Vector 21 [unity_SHBr]
//           Vector 24 [unity_SHC]
//         }
//       }
//     }
//   }
// }
// 
// Headers extracted with DarkStarSword's extract_unity_shaders.py
// https://raw.githubusercontent.com/DarkStarSword/3d-fixes/master/extract_unity_shaders.py

    vs_3_0
    def c32, 6.28318548, -3.14159274, 1, 0
    def c33, 0, 30, 0.159154937, 0.5
    dcl_position v0
    dcl_normal v1
    dcl_texcoord v2
    dcl_texcoord1 v3
    dcl_position o0
    dcl_texcoord o1
    dcl_texcoord1 o2.xyz
    dcl_texcoord2 o3.xyz
    dcl_texcoord3 o4.xyz
    dcl_texcoord4 o5.xyz
    dcl_texcoord6 o6
    add r0.x, c29.x, -v0.y
    slt r0.y, c33.x, r0.x
    mov r1.yzw, c33
    mad r0.x, r0.x, -r1.y, c29.x
    lrp r2.y, r0.y, r0.x, v0.y
    mov r2.xzw, v0
    dp4 o0.x, c4, r2
    dp4 o0.y, c5, r2
    dp4 o0.z, c6, r2
    dp4 o0.w, c7, r2
    mad o1.xy, v2, c30, c30.zwzw
    mad o1.zw, v3.xyxy, c31.xyxy, c31
    dp4 r0.y, c9, r2
    add r3, -r0.y, c15
    mul r4, r3, r3
    dp4 r0.x, c8, r2
    dp4 r0.z, c10, r2
    add r5, -r0.x, c14
    mov o3.xyz, r0
    add r0, -r0.z, c16
    mad r4, r5, r5, r4
    mad r4, r0, r0, r4
    rsq r6.x, r4.x
    rsq r6.y, r4.y
    rsq r6.z, r4.z
    rsq r6.w, r4.w
    mov r7.z, c32.z
    mad r4, r4, c17, r7.z
    mul r7.xyz, c12, v1.y
    mad r7.xyz, c11, v1.x, r7
    mad r7.xyz, c13, v1.z, r7
    nrm r8.xyz, r7
    mul r3, r3, r8.y
    mad r3, r5, r8.x, r3
    mad r0, r0, r8.z, r3
    mul r0, r6, r0
    max r0, r0, c33.x
    rcp r3.x, r4.x
    rcp r3.y, r4.y
    rcp r3.z, r4.z
    rcp r3.w, r4.w
    mul r0, r0, r3
    mul r3.xyz, r0.y, c1
    mad r3.xyz, c0, r0.x, r3
    mad r0.xyz, c2, r0.z, r3
    mad r0.xyz, c3, r0.w, r0
    mul r0.w, r8.y, r8.y
    mad r0.w, r8.x, r8.x, -r0.w
    mul r3, r8.yzzx, r8.xyzz
    dp4 r4.x, c21, r3
    dp4 r4.y, c22, r3
    dp4 r4.z, c23, r3
    mad r3.xyz, c24, r0.w, r4
    mov r8.w, c32.z
    dp4 r4.x, c18, r8
    dp4 r4.y, c19, r8
    dp4 r4.z, c20, r8
    mov o2.xyz, r8
    add r3.xyz, r3, r4
    add o5.xyz, r0, r3
    mad r0.x, c28.x, r1.z, r1.w
    frc r0.x, r0.x
    mad r0.x, r0.x, c32.x, c32.y
    sincos r1.xy, r0.x
    mul r0.xyz, r1.yxyw, v0.zxxw
    mad r2.z, v0.z, r1.x, -r0.z
    add r2.x, r0.y, r0.x
    mov r0.xyz, c26
    add r0.xyz, r0, c27
    add r0.xyz, r2, r0
    add r1.x, -r0.y, c29.x
    pow r2.x, r1.x, c25.x
    slt r1.x, c33.x, r1.x
    add r1.y, -r2.x, c29.x
    add r1.y, -r0.y, r1.y
    mad r0.w, r1.x, r1.y, r0.y
    mov o4.xyz, r0.xwzw
    mov o6, c33.x
