// CRC32: E77F057B |    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 1/5 {
//          Name "FORWARD"
//          Tags { "LIGHTMODE"="ForwardBase" "QUEUE"="Geometry-10" "SHADOWSUPPORT"="true" "RenderType"="Opaque" }
//          GpuProgramID 21820
//          Program "vp" {
//            SubProgram "d3d9 " {
//              GpuProgramIndex 1
//            }
//          }
//        }
//      }
//    }
//
// Unity 5.3 headers extracted from PackIce.shader.decompressed:
//   API d3d9
//   Shader model vs_3_0
//   undeciphered1: 71 4 -1
//   Keywords { "DIRECTIONAL" "SHADOWS_SCREEN" "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" }
//   undeciphered3: 13 3 0 0 2 1 3 4 1
//   Float 12 [_AtlasMaterialIndex]
//   Vector 13 [_FilteredFirstHexaTexture_TexelSize]
//   Vector 9 [_ProjectionParams]
//   Vector 16 [_RegionColorAndNeutralMap_TexelSize]
//   Vector 10 [_ScreenParams]
//   Float 15 [_Winter]
//   Vector 14 [_WorldSize]
//   Vector 11 [unity_WorldTransformParams]
//   Matrix 4 [_Object2World] 3
//   Matrix 7 [_World2Object] 2
//   Matrix 0 [glstate_matrix_mvp]
//   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:38 2016
//
//
// Parameters:
//
//   float _AtlasMaterialIndex;
//   sampler2D _FilteredFirstHexaTexture;
//   float4 _FilteredFirstHexaTexture_TexelSize;
//   row_major float4x4 _Object2World;
//   float4 _ProjectionParams;
//   sampler2D _RegionColorAndNeutralMap;
//   float4 _RegionColorAndNeutralMap_TexelSize;
//   float4 _ScreenParams;
//   float _Winter;
//   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       2
//   _ProjectionParams                   c9       1
//   _ScreenParams                       c10      1
//   unity_WorldTransformParams          c11      1
//   _AtlasMaterialIndex                 c12      1
//   _FilteredFirstHexaTexture_TexelSize c13      1
//   _WorldSize                          c14      1
//   _Winter                             c15      1
//   _RegionColorAndNeutralMap_TexelSize c16      1
//   _FilteredFirstHexaTexture           s0       1
//   _RegionColorAndNeutralMap           s1       1
//
//
// Default values:
//
//   _Winter
//     c15  = { 0, 0, 0, 0 };
//

    vs_3_0
    def c17, 0.00999999978, 0, 0.5, 0.00392156886
    def c18, 256, 1, -0.0500000007, 0
    dcl_position v0
    dcl_texcoord v1
    dcl_color v2
    dcl_2d s0
    dcl_2d s1
    dcl_position o0
    dcl_texcoord o1
    dcl_texcoord1 o2
    dcl_texcoord2 o3
    dcl_color o4
    dcl_texcoord3 o5
    dcl_texcoord4 o6
    dcl_texcoord5 o7

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

    mov r0.xz, c17
    slt r0.x, c15.x, r0.x
    mad r1, r0.x, -v0, v0
    add r2, r1, c17.yxyy
    add r0.x, r1.y, c17.x
    dp4 o5.y, c5, r2
    add r0.y, r0.z, c12.x
    frc r0.w, r0.y
    add r0.y, -r0.w, r0.y
    mul o4.x, r0.y, c17.w
    mul r0.y, c18.x, v2.w
    mul r1.x, r0.y, c16.x
    frc r0.y, r1.x
    add r0.y, -r0.y, r1.x
    mul r1.y, r0.y, c16.y
    mad r1.xy, c16, r0.z, r1
    mov r1.zw, c17.y
    texldl o6, r1, s1
    rcp r1.x, c14.x
    rcp r1.y, c14.y
    dp4 r3.x, c4, r2
    dp4 r3.z, c6, r2
    mul r1.xy, r1, r3.xzzw
    mov o5.xz, r3
    max r0.y, r1.y, c17.y
    mov r1.y, c18.y
    add r0.z, r1.y, -c13.y
    min r1.z, r0.z, r0.y
    mov r1.w, c17.y
    texldl r1, r1.xzww, s0
    add r0.y, -r1.x, c17.z
    add_sat r0.y, r0.y, r0.y
    lrp r2.y, r0.y, c18.z, r0.x
    dp4 o1.w, c4, r2
    dp4 o2.w, c5, r2
    dp4 o3.w, c6, r2
    dp4 r0.x, c0, r2
    dp4 r0.y, c1, r2
    dp4 r0.w, c3, r2
    dp4 r0.z, c2, r2

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\E77F057B.txt
texldl r31, c220.z, s3
add r31.w, r0.w, -r31.y
mad r0.x, r31.w, r31.x, r0.x

    mul r1.xyz, r0.xyww, c17.z

//     mov o0, r0 // Relocated to line 158 with shadertool.py
    mov o7.zw, r0
    mul r1.w, r1.y, c9.x
    mad o7.xy, r1.z, c10.zwzw, r1.xwzw
    mov r0.z, c4.x
    mov r0.x, c5.x
    mov r0.y, c6.x
    dp3 r0.w, r0, r0
    rsq r0.w, r0.w
    mul r0.xyz, r0.w, r0
    mov o1.x, r0.z
    dp3 r0.w, c8, c8
    rsq r0.w, r0.w
    mul r1.xyz, r0.w, c8.zxyw
    mul r2.xyz, r0, r1
    mad r2.xyz, r1.zxyw, r0.yzxw, -r2
    mul r2.xyz, r2, -c11.w
    mov o1.y, r2.x
    mov o1.z, r1.y
    mov o2.x, r0.x
    mov o3.x, r0.y
    mov o2.y, r2.y
    mov o3.y, r2.z
    mov o2.z, r1.z
    mov o3.z, r1.x
    mov o4.yzw, v2
    mov o5.w, v1.x

// approximately 70 instruction slots used (4 texture, 66 arithmetic)
