// CRC32: 84098BE2 |    Unity headers extracted from CutOffCommon.shader
//    Shader "Amplitude/CutOff Common" {
//      Properties {
//       _Shininess ("Shininess", Float) = 0.2
//       _Intensity ("Intensity", Float) = 1
//       _Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
//       _AltitudeGammaCorrectionFactor ("Altitude Gamma Correction", Float) = 0.25
//       _MainTex ("Texture", 2D) = "white" { }
//       _BumpMap ("Bumpmap (RGB)", 2D) = "bump" { }
//       _SpecMap ("Spec map (RGB)", 2D) = "white" { }
//       _IlluminMap ("IlluminMap (RGB)", 2D) = "black" { }
//       _ViewSensitivity ("3D, Battle, 2D, Empire", Vector) = (1,0,0,0)
//       _WinterSensitivity ("Summer, Winter, WinterIntensity, Fow intensity", Vector) = (1,1,1,1)
//      }
//      Fallback Off
//      SubShader 1/1 {
//        Tags { "QUEUE"="Geometry" "RenderType"="Opaque" }
//        Pass 5/5 {
//          Name "SHADOWCASTER"
//          Tags { "LIGHTMODE"="SHADOWCASTER" "QUEUE"="Geometry" "SHADOWSUPPORT"="true" "RenderType"="Opaque" }
//          GpuProgramID 307674
//          Program "vp" {
//            SubProgram "d3d9 " {
//              GpuProgramIndex 40
//            }
//          }
//        }
//      }
//    }
//
// Unity 5.3 headers extracted from CutOffCommon.shader.decompressed:
//   API d3d9
//   Shader model vs_3_0
//   undeciphered1: 86 4 -1
//   Keywords { "SHADOWS_DEPTH" "DEFAULT_RENDERER" }
//   undeciphered3: 11 3 0 0 1 2 3 4 1
//   Vector 18 [_FirstHexaTextureLookup_TexelSize]
//   Vector 19 [_MainTex_ST]
//   Vector 17 [_RegionColorAndNeutralMap_TexelSize]
//   Vector 16 [_WorldSize]
//   Vector 14 [_WorldSpaceLightPos0]
//   Vector 15 [unity_LightShadowBias]
//   Matrix 8 [_Object2World] 3
//   Matrix 11 [_World2Object] 3
//   Matrix 0 [glstate_matrix_mvp]
//   Matrix 4 [unity_MatrixVP]
//   SetTexture 0 [_RegionColorAndNeutralMap] 2D 0
//   SetTexture 1 [_FirstHexaTextureLookup] 2D 1
//
// Headers extracted with DarkStarSword's extract_unity53_shaders.py
// https://raw.githubusercontent.com/DarkStarSword/3d-fixes/master/extract_unity53_shaders.py

//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//   using 3Dmigoto command line v1.2.38 on Sun Oct 16 02:24:59 2016
//
//
// Parameters:
//
//   sampler2D _FirstHexaTextureLookup;
//   float4 _FirstHexaTextureLookup_TexelSize;
//   float4 _MainTex_ST;
//   row_major float4x4 _Object2World;
//   sampler2D _RegionColorAndNeutralMap;
//   float4 _RegionColorAndNeutralMap_TexelSize;
//   row_major float4x4 _World2Object;
//   float4 _WorldSize;
//   float4 _WorldSpaceLightPos0;
//   row_major float4x4 glstate_matrix_mvp;
//   float4 unity_LightShadowBias;
//   row_major float4x4 unity_MatrixVP;
//
//
// Registers:
//
//   Name                                Reg   Size
//   ----------------------------------- ----- ----
//   glstate_matrix_mvp                  c0       4
//   unity_MatrixVP                      c4       4
//   _Object2World                       c8       3
//   _World2Object                       c11      3
//   _WorldSpaceLightPos0                c14      1
//   unity_LightShadowBias               c15      1
//   _WorldSize                          c16      1
//   _RegionColorAndNeutralMap_TexelSize c17      1
//   _FirstHexaTextureLookup_TexelSize   c18      1
//   _MainTex_ST                         c19      1
//   _RegionColorAndNeutralMap           s0       1
//   _FirstHexaTextureLookup             s1       1
//

    vs_3_0
    def c20, -0.666666687, -0.5, 0.5, 1
    def c21, 0, 255, 1, 0
    dcl_position v0
    dcl_normal v1
    dcl_texcoord v2
    dcl_2d s0
    dcl_2d s1
    dcl_texcoord o0
    dcl_position o1
    dcl_texcoord1 o2.xy
    dcl_texcoord2 o3.xyz
    dcl_texcoord3 o4

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

    dp4 o3.z, c9, v0
    dp4 r0.x, c8, v0
    dp4 r0.y, c10, v0
    rcp r1.x, c16.x
    rcp r1.y, c16.y
    mul r0.xy, r0, r1
    rcp r1.z, c18.x
    rcp r1.y, c18.y
    mad r1.yz, r1, r0.xyxw, c20.xxyw
    mov o3.xy, r0
    mad r1.x, r1.y, -c20.z, r1.z
    frc r0.xy, r1
    add r0.zw, -r0.xyxy, r1.xyxy
    mad r1.xy, r0.yxzw, c20.z, r0
    sge r0.y, r0.y, r0.x
    sge r1.zw, c20.w, r1.xyxy
    sge r1.xy, r1, c20.z
    mul r1.zw, r1, r1.xyxy
    mul r1.x, r1.y, r1.x
    add r1.y, r1.w, r1.z
    min r1.y, r1.y, c20.w
    add r0.x, -r0.y, c20.w
    lrp r2.xy, r1.y, r0, r1.x
    add r0.xy, r0.zwzw, r2
    add r0.xy, r0, c20.z
    mul r0.xy, r0, c18
    mov r1.zw, c20
    mul r1.x, r1.z, c18.y
    max r0.y, r0.y, r1.x
    mad r1.x, c18.y, -r1.z, r1.w
    min r0.z, r0.y, r1.x
    mov r0.w, c21.x
    texldl r0, r0.xzww, s1
    mul r0.x, r0.w, c17.x
    mul r0.x, r0.x, c21.y
    frc r0.z, r0.x
    add r0.z, -r0.z, r0.x
    mul r0.y, r0.z, c17.y
    mad r0.xy, c17, r1.z, r0
    mov r0.zw, c21.x
    texldl o4, r0, s0
    mad o2.xy, v2, c19, c19.zwzw
    abs r0.x, c15.z
    slt r0.x, -r0.x, r0.x
    mul r0.yzw, c12.xxyz, v1.y
    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, c21.zzzx, c21.xxxz
    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, c20.w
    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, c20.w
    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 o1, r2 // Relocated from line 181 with shadertool.py

// Automatic vertex shader halo fix inserted with DarkStarSword's shadertool.py:
// shadertool.py -i --fix-unity-reflection --auto-fix-vertex-halo --add-fog-on-sm3-update --stereo-sampler-vs s3 --only-autofixed --ignore-parse-errors --ignore-register-errors --ignore-other-errors dumps\allshaders\vertexshader\84098BE2.txt
texldl r31, c220.z, s3
add r31.w, r2.w, -r31.y
mad r2.x, r31.w, r31.x, r2.x

    rcp r0.x, r2.w
    mul_sat r0.x, r0.x, c15.x
    add r0.x, r0.x, r2.z
    max r0.y, r0.x, c21.x
    lrp r2.z, c15.y, r0.y, r0.x
    mov o0, r2

//     mov o1, r2 // Relocated to line 175 with shadertool.py
mov o1.z, r2 // Inserted by shadertool.py


// approximately 83 instruction slots used (4 texture, 79 arithmetic)
