// CRC32: 5ED07A72 |    Unity headers extracted from DecalAlphaTestFactionColor.shader
//    Shader "Amplitude/Environment/Terrain/DecalAlphaTestFactionColor" {
//      Properties {
//       _Shininess ("Shininess", Range(0.01,1)) = 0.078125
//       _AltitudeGammaCorrectionFactor ("Altitude Gamma Correction", Float) = 0.25
//       _MainTex ("Base (RGB) TransGloss (A)", 2D) = "white" { }
//       _SpecularTex ("GlossColor", 2D) = "black" { }
//       _NormalTex ("Normal", 2D) = "bump" { }
//       _IllumTex ("Illum", 2D) = "black" { }
//       _FactionMaskMap ("FactionMask Map", 2D) = "white" { }
//       _HexaGridTexture ("Hexa Grid Tex", 2D) = "black" { }
//       _Intensity ("Intensity", Float) = 0.5
//       _ViewSensitivity ("3D, Battle, 2D, Empire", Vector) = (1,0,0,0)
//       _WinterSensitivity ("Summer, Winter, WinterIntensity, Fow intensity", Vector) = (1,1,1,1)
//       _Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
//       _VisibilityStatus ("Visible at date1, date1, visible at date0, date0", Vector) = (1,0,1,-1)
//      }
//      Fallback Off
//      SubShader 1/1 {
//        Tags { "QUEUE"="Geometry-5" "RenderType"="Opaque" }
//        Pass 4/5 {
//          Name "PREPASS"
//          Tags { "LIGHTMODE"="PrePassFinal" "QUEUE"="Geometry-5" "RenderType"="Opaque" }
//          ZWrite Off
//          GpuProgramID 216532
//          Program "vp" {
//            SubProgram "d3d9 " {
//              GpuProgramIndex 32
//            }
//          }
//        }
//      }
//    }
//
// Unity 5.3 headers extracted from DecalAlphaTestFactionColor.shader.decompressed:
//   API d3d9
//   Shader model vs_3_0
//   undeciphered1: 35 2 -1
//   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "HDR_LIGHT_PREPASS_OFF" "DEFAULT_RENDERER" }
//   undeciphered3: 13 3 0 0 2 1 3 4 1
//   Vector 10 [_CameraPos]
//   Vector 12 [_MainTex_ST]
//   Vector 7 [_ProjectionParams]
//   Vector 11 [_RegionColorAndNeutralMap_TexelSize]
//   Vector 8 [_ScreenParams]
//   Vector 9 [_WorldSize]
//   Matrix 4 [_Object2World] 3
//   Matrix 0 [glstate_matrix_mvp]
//   SetTexture 0 [_RegionColorAndNeutralMap] 2D 0
//
// 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:25:07 2016
//
//
// Parameters:
//
//   float4 _CameraPos;
//   float4 _MainTex_ST;
//   row_major float4x4 _Object2World;
//   float4 _ProjectionParams;
//   sampler2D _RegionColorAndNeutralMap;
//   float4 _RegionColorAndNeutralMap_TexelSize;
//   float4 _ScreenParams;
//   float4 _WorldSize;
//   row_major float4x4 glstate_matrix_mvp;
//
//
// Registers:
//
//   Name                                Reg   Size
//   ----------------------------------- ----- ----
//   glstate_matrix_mvp                  c0       4
//   _Object2World                       c4       3
//   _ProjectionParams                   c7       1
//   _ScreenParams                       c8       1
//   _WorldSize                          c9       1
//   _CameraPos                          c10      1
//   _RegionColorAndNeutralMap_TexelSize c11      1
//   _MainTex_ST                         c12      1
//   _RegionColorAndNeutralMap           s0       1
//

    vs_3_0
    def c13, -5, 0.0500000007, 1, 0.5
    def c14, 1, 0.5, 0.166666672, 0
    def c15, 255, 65280, 0, 0
    dcl_position v0
    dcl_texcoord v1
    dcl_color v2
    dcl_2d s0
    dcl_position o0
    dcl_texcoord o1.xy
    dcl_texcoord1 o2.xyz
    dcl_texcoord2 o3
    dcl_texcoord3 o4.xyz
    dcl_texcoord4 o5
    dcl_texcoord5 o6

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

    dp4 r0.x, c4, v0
    dp4 r0.y, c6, v0
    rcp r1.x, c9.x
    rcp r1.y, c9.y
    mul o2.xy, r0, r1
    mul r0.xy, r0, c9.zwzw
    mul r0.xy, r1, r0
    mad o4.xy, r0, c14, c14.yzzw
    mov r0.xw, c13
    add r0.x, r0.x, c10.y
    mul_sat r0.x, r0.x, c13.y
    add o4.z, r0.x, c13.z
    mul r0.xy, c15, v2.wzzw
    add r0.x, r0.y, r0.x
    mul r0.x, r0.x, c11.x
    frc r0.z, r0.x
    add r0.z, -r0.z, r0.x
    mul r0.y, r0.z, c11.y
    mad r0.xy, c11, r0.w, r0
    mov r0.zw, c14.w
    texldl o3, r0, s0
    mad o1.xy, v1, c12, c12.zwzw
    dp4 r0.y, c1, v0
    mul r1.x, r0.y, c7.x
    mul r1.w, r1.x, c13.w
    dp4 r0.x, c0, v0
    dp4 r0.w, c3, v0

mov o0, r0 // Relocated from line 132 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\5ED07A72.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, c13.w
    mad o5.xy, r1.z, c8.zwzw, r1.xwzw
    dp4 r0.z, c2, v0

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

    mov o5.zw, r0
    mov o2.z, v0.y
    mov o6, c14.w

// approximately 35 instruction slots used (2 texture, 33 arithmetic)
