// CRC32: E79B9EBE |    Unity headers extracted from Common.shader
//    Shader "Amplitude/Common" {
//      Properties {
//       _Shininess ("Shininess", Float) = 0.078125
//       _Intensity ("Intensity", Float) = 1
//       _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, FowIntensity", Vector) = (1,1,1,1)
//      }
//      Fallback Off
//      SubShader 1/1 {
//        Tags { "QUEUE"="Geometry" "RenderType"="Opaque" }
//        Pass 1/5 {
//          Name "FORWARD"
//          Tags { "LIGHTMODE"="ForwardBase" "QUEUE"="Geometry" "SHADOWSUPPORT"="true" "RenderType"="Opaque" }
//          GpuProgramID 22393
//          Program "vp" {
//            SubProgram "d3d9 " {
//              GpuProgramIndex 1
//            }
//          }
//        }
//      }
//    }
//
// Unity 5.3 headers extracted from Common.shader.decompressed:
//   API d3d9
//   Shader model vs_3_0
//   undeciphered1: 84 4 -1
//   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "DEFAULT_RENDERER" }
//   undeciphered3: 139 4 0 0 1 2 3 4 7 8 1
//   Vector 15 [_FirstHexaTextureLookup_TexelSize]
//   Vector 16 [_MainTex_ST]
//   Vector 10 [_ProjectionParams]
//   Vector 14 [_RegionColorAndNeutralMap_TexelSize]
//   Vector 11 [_ScreenParams]
//   Vector 13 [_WorldSize]
//   Vector 12 [unity_WorldTransformParams]
//   Matrix 4 [_Object2World] 3
//   Matrix 7 [_World2Object] 3
//   Matrix 0 [glstate_matrix_mvp]
//   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:35 2016
//
//
// Parameters:
//
//   sampler2D _FirstHexaTextureLookup;
//   float4 _FirstHexaTextureLookup_TexelSize;
//   float4 _MainTex_ST;
//   row_major float4x4 _Object2World;
//   float4 _ProjectionParams;
//   sampler2D _RegionColorAndNeutralMap;
//   float4 _RegionColorAndNeutralMap_TexelSize;
//   float4 _ScreenParams;
//   row_major float4x4 _World2Object;
//   float4 _WorldSize;
//   row_major float4x4 glstate_matrix_mvp;
//   float4 unity_WorldTransformParams;
//
//
// Registers:
//
//   Name                                Reg   Size
//   ----------------------------------- ----- ----
//   glstate_matrix_mvp                  c0       4
//   _Object2World                       c4       3
//   _World2Object                       c7       3
//   _ProjectionParams                   c10      1
//   _ScreenParams                       c11      1
//   unity_WorldTransformParams          c12      1
//   _WorldSize                          c13      1
//   _RegionColorAndNeutralMap_TexelSize c14      1
//   _FirstHexaTextureLookup_TexelSize   c15      1
//   _MainTex_ST                         c16      1
//   _RegionColorAndNeutralMap           s0       1
//   _FirstHexaTextureLookup             s1       1
//

    vs_3_0
    def c17, -0.666666687, -0.5, 0.5, 1
    def c18, 0, 255, 0, 0
    dcl_position v0
    dcl_tangent v1
    dcl_normal v2
    dcl_texcoord v3
    dcl_2d s0
    dcl_2d s1
    dcl_position o0
    dcl_texcoord o1.xy
    dcl_texcoord1 o2
    dcl_texcoord2 o3
    dcl_texcoord3 o4
    dcl_texcoord4 o5.xyz
    dcl_texcoord5 o6
    dcl_texcoord6 o7

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

    rcp r0.z, c15.x
    rcp r0.y, c15.y
    rcp r1.x, c13.x
    rcp r1.y, c13.y
    dp4 r2.x, c4, v0
    dp4 r2.y, c6, v0
    mul r0.xw, r1.xyzy, r2.xyzy
    mov o2.w, r2.x
    mov o4.w, r2.y
    mad r1.yz, r0, r0.xwxw, c17.xxyw
    mov o5.xy, r0.xwzw
    mad r1.x, r1.y, -c17.z, r1.z
    frc r0.xy, r1
    add r0.zw, -r0.xyxy, r1.xyxy
    mad r1.xy, r0.yxzw, c17.z, r0
    sge r0.y, r0.y, r0.x
    sge r1.zw, c17.w, r1.xyxy
    sge r1.xy, r1, c17.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, c17.w
    add r0.x, -r0.y, c17.w
    lrp r2.xy, r1.y, r0, r1.x
    add r0.xy, r0.zwzw, r2
    add r0.xy, r0, c17.z
    mul r0.xy, r0, c15
    mov r1.zw, c17
    mul r1.x, r1.z, c15.y
    max r0.y, r0.y, r1.x
    mad r1.x, c15.y, -r1.z, r1.w
    min r0.z, r0.y, r1.x
    mov r0.w, c18.x
    texldl r0, r0.xzww, s1
    mul r0.x, r0.w, c14.x
    mul r0.x, r0.x, c18.y
    frc r0.z, r0.x
    add r0.z, -r0.z, r0.x
    mul r0.y, r0.z, c14.y
    mad r0.xy, c14, r1.z, r0
    mov r0.zw, c18.x
    texldl o6, r0, s0
    mad o1.xy, v3, c16, c16.zwzw
    dp4 r0.y, c1, v0
    mul r1.x, r0.y, c10.x
    mul r1.w, r1.x, c17.z
    dp4 r0.x, c0, v0
    dp4 r0.w, c3, v0

mov o0, r0 // Relocated from line 159 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\E79B9EBE.txt
texldl r31, c220.z, s3
add r31.w, r0.w, -r31.y
mad r0.x, r31.w, r31.x, r0.x

    mul r1.xz, r0.xyww, c17.z
    mad o7.xy, r1.z, c11.zwzw, r1.xwzw
    dp4 r0.z, c2, v0

//     mov o0, r0 // Relocated to line 156 with shadertool.py
mov o0.z, r0 // Inserted by shadertool.py

    mov o7.zw, r0
    dp3 r0.z, c4, v1
    dp3 r0.x, c5, v1
    dp3 r0.y, c6, v1
    dp3 r0.w, r0, r0
    rsq r0.w, r0.w
    mul r0.xyz, r0.w, r0
    mov o2.x, r0.z
    mul r1.xyz, c8.zxyw, v2.y
    mad r1.xyz, c7.zxyw, v2.x, r1
    mad r1.xyz, c9.zxyw, v2.z, r1
    dp3 r0.w, r1, r1
    rsq r0.w, r0.w
    mul r1.xyz, r0.w, r1
    mul r2.xyz, r0, r1
    mad r2.xyz, r1.zxyw, r0.yzxw, -r2
    mul r0.z, c12.w, v1.w
    mul r2.xyz, r0.z, r2
    mov o2.y, r2.x
    mov o2.z, r1.y
    mov o3.x, r0.x
    mov o4.x, r0.y
    mov o3.y, r2.y
    mov o4.y, r2.z
    mov o3.z, r1.z
    mov o4.z, r1.x
    dp4 r0.x, c5, v0
    mov o3.w, r0.x
    mov o5.z, r0.x

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