// CRC32: DC6F6FD7 |    Unity headers extracted from Icons3DInstancing3.shader
//    Shader "Instancing3/Amplitude/Environment/Icons3D" {
//      Properties {
//       _MainTex ("Base (RGB) Trans (A)", 2D) = "white" { }
//       _ViewSensitivity ("3D, Battle, 2D, Empire", Vector) = (1,0,0,0)
//       _WinterSensitivity ("Summer, Winter, WinterIntensity, Fow intensity", Vector) = (1,1,1,1)
//       _AltitudeGammaCorrectionFactor ("Altitude Gamma Correction", Float) = 0.25
//       _StartUV ("Start UV) ", Vector) = (0,0,0,0)
//       _MinBBox ("_MinBox) ", Vector) = (0,0,0,1)
//       _MaxBBox ("_MaxBox) ", Vector) = (0,0,0,1)
//       _Offset ("_Offset) ", Vector) = (0,0,0,0)
//       _ControlTex ("ControlTex", 2D) = "white" { }
//      }
//      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 266499
//          Program "vp" {
//            SubProgram "d3d9 " {
//              GpuProgramIndex 20
//            }
//          }
//        }
//      }
//    }
//
// Unity 5.3 headers extracted from Icons3DInstancing3.shader.decompressed:
//   API d3d9
//   Shader model vs_3_0
//   undeciphered1: 122 10 -1
//   Keywords { "SHADOWS_DEPTH" }
//   undeciphered3: 13 3 0 0 2 1 3 4 1
//   Vector 18 [_ControlTex_TexelSize]
//   Vector 17 [_FirstHexaTextureLookup_TexelSize]
//   Vector 23 [_MainTex_ST]
//   Vector 21 [_MaxBBox]
//   Vector 20 [_MinBBox]
//   Vector 22 [_Offset]
//   Vector 16 [_RegionColorAndNeutralMap_TexelSize]
//   Vector 19 [_StartUV]
//   Vector 15 [_WorldSize]
//   Vector 13 [_WorldSpaceLightPos0]
//   Vector 14 [unity_LightShadowBias]
//   Matrix 8 [_Object2World] 3
//   Matrix 11 [_World2Object] 2
//   Matrix 0 [glstate_matrix_mvp]
//   Matrix 4 [unity_MatrixVP]
//   SetTexture 0 [_RegionColorAndNeutralMap] 2D 0
//   SetTexture 1 [_FirstHexaTextureLookup] 2D 1
//   SetTexture 2 [_ControlTex] 2D 2
//
// 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:33 2016
//
//
// Parameters:
//
//   sampler2D _ControlTex;
//   float4 _ControlTex_TexelSize;
//   sampler2D _FirstHexaTextureLookup;
//   float4 _FirstHexaTextureLookup_TexelSize;
//   float4 _MainTex_ST;
//   float4 _MaxBBox;
//   float4 _MinBBox;
//   row_major float4x4 _Object2World;
//   float4 _Offset;
//   sampler2D _RegionColorAndNeutralMap;
//   float4 _RegionColorAndNeutralMap_TexelSize;
//   float4 _StartUV;
//   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      2
//   _WorldSpaceLightPos0                c13      1
//   unity_LightShadowBias               c14      1
//   _WorldSize                          c15      1
//   _RegionColorAndNeutralMap_TexelSize c16      1
//   _FirstHexaTextureLookup_TexelSize   c17      1
//   _ControlTex_TexelSize               c18      1
//   _StartUV                            c19      1
//   _MinBBox                            c20      1
//   _MaxBBox                            c21      1
//   _Offset                             c22      1
//   _MainTex_ST                         c23      1
//   _RegionColorAndNeutralMap           s0       1
//   _FirstHexaTextureLookup             s1       1
//   _ControlTex                         s2       1
//

    vs_3_0
    def c24, 1, 0, 2, 256
    def c25, 0.00389105058, -0.666666687, -0.5, -1
    def c26, 255, 765, 0, 0.5
    dcl_position v0
    dcl_texcoord v1
    dcl_color v2
    dcl_2d s0
    dcl_2d s1
    dcl_2d s2
    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

    mov r0.zw, c26.z
    mov r1.y, c26.z
    mul r1.zw, c26.xyxy, v2.x
    mul r1.x, r1.w, c18.x
    sge r1.z, r1.z, c22.w
    add r1.xy, r1, c19
    mov r1.w, c26.w
    mad r2.xy, c18, r1.w, r1
    mov r3.xyz, c24
    mad r0.xy, c18.x, r3, r2
    texldl r0, r0, s2
    mad r0.xy, r0.ywzw, c24.w, r0.xzzw
    mul r0.zw, r0.xyxy, c25.x
    mul r4.xy, r0.w, c24
    mad r5.xy, c18.x, r3.zyzw, r2
    mov r5.zw, c26.z
    texldl r5, r5, s2
    mad r1.xy, r5.ywzw, c24.w, r5.xzzw
    mul r4.z, r1.x, c25.x
    mul r0.w, r1.y, c21.w
    mul r5.y, r0.w, c25.x
    mul r6.xyz, r3.xyxw, c20.w
    mad r3.xyz, c21.w, r3.xyxw, -r6
    mad r3.xyz, r4, r3, r6
    mul r3.xyz, r5.y, r3
    mov r5.xz, c26.z
    mul r4.xyz, r5, v0.y
    mad r4.xyz, v0.x, r3, r4
    mul r5.x, -r3.z, v0.z
    mul r5.z, r3.x, v0.z
    mov r5.y, c26.z
    add r3.xyz, r4, r5
    mov r2.zw, c26.z
    texldl r2, r2, s2
    mad r1.xy, r2.ywzw, c24.w, r2.xzzw
    mul r0.xy, r1, c25.x
    mov r2.xyz, c20
    add r2.xyz, -r2, c21
    mad r0.xyz, r0, r2, c20
    mad r0.xyz, c22, r1.z, r0
    add r0.xyz, r0, r3
    mov r0.w, v0.w
    dp4 o3.z, c9, r0
    dp4 r1.x, c8, r0
    dp4 r1.y, c10, r0
    mad r0, r0.xyzx, c24.xxxy, c24.yyyx
    rcp r2.x, c15.x
    rcp r2.y, c15.y
    mul r1.xy, r1, r2
    rcp r2.z, c17.x
    rcp r2.y, c17.y
    mad r2.yz, r2, r1.xyxw, c25
    mov o3.xy, r1
    mad r2.x, r2.y, -c26.w, r2.z
    frc r1.xy, r2
    add r2.xy, -r1, r2
    mad r2.zw, r1.xyyx, c26.w, r1.xyxy
    sge r1.y, r1.y, r1.x
    sge r3.xy, c24.x, r2.zwzw
    sge r2.zw, r2, c26.w
    mul r3.xy, r3, r2.zwzw
    mul r1.z, r2.w, r2.z
    add r2.z, r3.y, r3.x
    min r2.z, r2.z, c24.x
    add r1.x, -r1.y, c24.x
    lrp r3.xy, r2.z, r1, r1.z
    add r1.xy, r2, r3
    add r1.xy, r1, c26.w
    mul r2.xy, r1, c17
    mul r1.x, r1.w, c17.y
    max r1.x, r1.x, r2.y
    mov r3.zw, c25
    mad r1.y, c17.y, r3.z, -r3.w
    min r2.z, r1.y, r1.x
    mov r2.w, c26.z
    texldl r2, r2.xzww, s1
    mul r1.x, r2.w, c16.x
    mul r1.x, r1.x, c26.x
    frc r1.z, r1.x
    add r1.z, -r1.z, r1.x
    mul r1.y, r1.z, c16.y
    mad r1.xy, c16, r1.w, r1
    mov r1.zw, c26.z
    texldl o4, r1, s0
    mad o2.xy, v1, c23, c23.zwzw
    dp4 r1.x, c0, r0
    dp4 r1.y, c1, r0
    dp4 r1.z, c2, r0
    dp4 r1.w, c3, r0
    dp4 r2.x, c8, r0
    dp4 r2.y, c9, r0
    dp4 r2.z, c10, r0
    mad r0.xyz, r2, -c13.w, c13
    nrm r3.xyz, r0
    nrm r0.xyz, c12
    dp3 r0.w, r0, r3
    mad r0.w, r0.w, -r0.w, c24.x
    rsq r0.w, r0.w
    rcp r0.w, r0.w
    mul r0.w, r0.w, c14.z
    mad r0.xyz, r0, -r0.w, r2
    mov r0.w, c24.x
    dp4 r2.x, c4, r0
    dp4 r2.y, c5, r0
    dp4 r2.z, c6, r0
    dp4 r2.w, c7, r0
    abs r0.x, c14.z
    slt r0.x, -r0.x, r0.x
    lrp r3, r0.x, r2, r1

mov o1, r3 // Relocated from line 239 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\DC6F6FD7.txt
texldl r31, c220.z, s3
add r31.w, r3.w, -r31.y
mad r3.x, r31.w, r31.x, r3.x

    rcp r0.x, r3.w
    mul_sat r0.x, r0.x, c14.x
    add r0.x, r0.x, r3.z
    max r0.y, r0.x, c26.z
    lrp r3.z, c14.y, r0.y, r0.x
    mov o0, r3

//     mov o1, r3 // Relocated to line 233 with shadertool.py
mov o1.z, r3 // Inserted by shadertool.py


// approximately 125 instruction slots used (10 texture, 115 arithmetic)
