// CRC32: 643A47F7 |    Unity headers extracted from PackIce.shader
//    Shader "Custom/PackIce" {
//      Properties {
//       _DiffuseAtlas ("DiffuseAtlas", 2D) = "white" { }
//       _SpecularAtlas ("SpecularAtlas", 2D) = "white" { }
//       _NormalAtlas ("NormalAtlas", 2D) = "white" { }
//       _IllumAtlas ("IllumAtlas", 2D) = "white" { }
//       _WhitePaper ("WhitePaper", 2D) = "white" { }
//       _HexaGridTexture ("Hexa Grid Tex", 2D) = "white" { }
//       _HexaPerTexture ("Hexa per Tex", Float) = 2
//       _NoiseTex ("NoiseTexture", 2D) = "white" { }
//       _NoiseTexNM ("NoiseTexture NM", 2D) = "white" { }
//       _AtlasMaterialIndex ("Atlas Material Index", Float) = 0
//       _FrozenParams ("Params : Transition size, IceTreshold, StartTransition, Tiling", Vector) = (0.269,0.224,0.15,6)
//      }
//      Fallback Off
//      SubShader 1/1 {
//        Tags { "QUEUE"="Geometry-10" "RenderType"="Opaque" }
//        Pass 5/5 {
//          Name "SHADOWCASTER"
//          Tags { "LIGHTMODE"="SHADOWCASTER" "QUEUE"="Geometry-10" "SHADOWSUPPORT"="true" "RenderType"="Opaque" }
//          GpuProgramID 279828
//          Program "vp" {
//            SubProgram "d3d9 " {
//              GpuProgramIndex 20
//            }
//          }
//        }
//      }
//    }
//
// Unity 5.3 headers extracted from PackIce.shader.decompressed:
//   API d3d9
//   Shader model vs_3_0
//   undeciphered1: 69 4 -1
//   Keywords { "SHADOWS_DEPTH" }
//   undeciphered3: 13 3 0 0 2 1 3 4 1
//   Vector 15 [_FilteredFirstHexaTexture_TexelSize]
//   Vector 18 [_RegionColorAndNeutralMap_TexelSize]
//   Float 17 [_Winter]
//   Vector 16 [_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 [_FilteredFirstHexaTexture] 2D 0
//   SetTexture 1 [_RegionColorAndNeutralMap] 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:25:40 2016
//
//
// Parameters:
//
//   sampler2D _FilteredFirstHexaTexture;
//   float4 _FilteredFirstHexaTexture_TexelSize;
//   row_major float4x4 _Object2World;
//   sampler2D _RegionColorAndNeutralMap;
//   float4 _RegionColorAndNeutralMap_TexelSize;
//   float _Winter;
//   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
//   _FilteredFirstHexaTexture_TexelSize c15      1
//   _WorldSize                          c16      1
//   _Winter                             c17      1
//   _RegionColorAndNeutralMap_TexelSize c18      1
//   _FilteredFirstHexaTexture           s0       1
//   _RegionColorAndNeutralMap           s1       1
//
//
// Default values:
//
//   _Winter
//     c17  = { 0, 0, 0, 0 };
//

    vs_3_0
    def c19, 0.00999999978, 0, 256, 0.5
    def c20, 1, -0.0500000007, 0, 0
    dcl_position v0
    dcl_texcoord v1
    dcl_color v2
    dcl_2d s0
    dcl_2d s1
    dcl_texcoord o0
    dcl_position o1
    dcl_texcoord1 o2
    dcl_texcoord2 o3

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

    mov r0.xw, c19
    slt r0.x, c17.x, r0.x
    mad r1, r0.x, -v0, v0
    add r2, r1, c19.yxyy
    add r0.x, r1.y, c19.x
    dp4 o2.y, c9, r2
    mul r0.y, c19.z, v2.w
    mul r1.x, r0.y, c18.x
    frc r0.y, r1.x
    add r0.y, -r0.y, r1.x
    mul r1.y, r0.y, c18.y
    mad r1.xy, c18, r0.w, r1
    mov r1.zw, c19.y
    texldl o3, r1, s1
    abs r0.y, c14.z
    slt r0.y, -r0.y, r0.y
    rcp r1.x, c16.x
    rcp r1.y, c16.y
    dp4 r3.x, c8, r2
    dp4 r3.z, c10, r2
    mad r2.xzw, r2.xyzx, c20.xyxz, c20.zyzx
    mul r1.xy, r1, r3.xzzw
    mov o2.xz, r3
    max r0.z, r1.y, c19.y
    mov r3.x, c20.x
    add r0.w, r3.x, -c15.y
    min r1.z, r0.w, r0.z
    mov r1.w, c19.y
    texldl r1, r1.xzww, s0
    add r0.z, -r1.x, c19.w
    add_sat r0.z, r0.z, r0.z
    lrp r2.y, r0.z, c20.y, r0.x
    dp4 r1.x, c8, r2
    dp4 r1.y, c9, r2
    dp4 r1.z, c10, r2
    mad r0.xzw, r1.xyyz, -c13.w, c13.xyyz
    nrm r3.xyz, r0.xzww
    nrm r4.xyz, c12
    dp3 r0.x, r4, r3
    mad r0.x, r0.x, -r0.x, c20.x
    rsq r0.x, r0.x
    rcp r0.x, r0.x
    mul r0.x, r0.x, c14.z
    mad r1.xyz, r4, -r0.x, r1
    mov r1.w, c20.x
    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.y, r3, r1

mov o1, r2 // Relocated from line 171 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\643A47F7.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, c14.x
    add r0.x, r0.x, r2.z
    max r0.y, r0.x, c19.y
    lrp r2.z, c14.y, r0.y, r0.x
    mov o0, r2

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

    mov o2.w, v1.x

// approximately 68 instruction slots used (4 texture, 64 arithmetic)
