// CRC32: 0939BA73 |    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 1/5 {
//          Name "FORWARD"
//          Tags { "LIGHTMODE"="ForwardBase" "QUEUE"="Geometry-5" "SHADOWSUPPORT"="true" "RenderType"="Opaque" }
//          GpuProgramID 52334
//          Program "vp" {
//            SubProgram "d3d9 " {
//              GpuProgramIndex 1
//            }
//          }
//        }
//      }
//    }
//
// Unity 5.3 headers extracted from DecalAlphaTestFactionColor.shader.decompressed:
//   API d3d9
//   Shader model vs_3_0
//   undeciphered1: 62 2 -1
//   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "DEFAULT_RENDERER" }
//   undeciphered3: 143 5 0 0 2 1 1 2 3 4 7 8 1
//   Vector 14 [_CameraPos]
//   Vector 16 [_MainTex_ST]
//   Vector 10 [_ProjectionParams]
//   Vector 15 [_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
//
// 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:04 2016
//
//
// Parameters:
//
//   float4 _CameraPos;
//   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
//   _CameraPos                          c14      1
//   _RegionColorAndNeutralMap_TexelSize c15      1
//   _MainTex_ST                         c16      1
//   _RegionColorAndNeutralMap           s0       1
//

    vs_3_0
    def c17, -5, 0.0500000007, 1, 0.5
    def c18, 1, 0.5, 0.166666672, 0
    def c19, 255, 65280, 0, 0
    dcl_position v0
    dcl_tangent v1
    dcl_normal v2
    dcl_texcoord v3
    dcl_color v4
    dcl_2d s0
    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.xyz
    dcl_texcoord7 o8

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

    rcp r0.x, c13.x
    rcp r0.y, c13.y
    dp4 r1.x, c4, v0
    dp4 r1.y, c6, v0
    mul o5.xy, r0, r1
    mov r2.xw, c17
    add r0.z, r2.x, c14.y
    mul_sat r0.z, r0.z, c17.y
    add o7.z, r0.z, c17.z
    mul r0.zw, r1.xyxy, c13
    mov o2.w, r1.x
    mov o4.w, r1.y
    mul r0.xy, r0, r0.zwzw
    mad o7.xy, r0, c18, c18.yzzw
    mul r0.xy, c19, v4.wzzw
    add r0.x, r0.y, r0.x
    mul r0.x, r0.x, c15.x
    frc r0.z, r0.x
    add r0.z, -r0.z, r0.x
    mul r0.y, r0.z, c15.y
    mad r0.xy, c15, r2.w, r0
    mov r0.zw, c18.w
    texldl o6, r0, s0
    mad o1.xy, v3, c16, c16.zwzw
    dp4 o3.w, c5, v0
    dp4 r0.y, c1, v0
    mul r1.x, r0.y, c10.x
    mul r1.w, r1.x, c17.w
    dp4 r0.x, c0, v0
    dp4 r0.w, c3, v0

mov o0, r0 // Relocated from line 144 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\0939BA73.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.w
    mad o8.xy, r1.z, c11.zwzw, r1.xwzw
    dp4 r0.z, c2, v0

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

    mov o8.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
    mov o5.z, v0.y

// approximately 62 instruction slots used (2 texture, 60 arithmetic)
