// CRC32: 407C88DE |    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 4/5 {
//          Name "PREPASS"
//          Tags { "LIGHTMODE"="PrePassFinal" "QUEUE"="Geometry-10" "RenderType"="Opaque" }
//          ZWrite Off
//          GpuProgramID 256695
//          Program "vp" {
//            SubProgram "d3d9 " {
//              GpuProgramIndex 16
//            }
//          }
//        }
//      }
//    }
//
// Unity 5.3 headers extracted from PackIce.shader.decompressed:
//   API d3d9
//   Shader model vs_3_0
//   undeciphered1: 49 4 -1
//   Keywords { "LIGHTMAP_OFF" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "HDR_LIGHT_PREPASS_OFF" }
//   undeciphered3: 13 3 0 0 2 1 3 4 1
//   Float 9 [_AtlasMaterialIndex]
//   Vector 10 [_FilteredFirstHexaTexture_TexelSize]
//   Vector 7 [_ProjectionParams]
//   Vector 13 [_RegionColorAndNeutralMap_TexelSize]
//   Vector 8 [_ScreenParams]
//   Float 12 [_Winter]
//   Vector 11 [_WorldSize]
//   Matrix 4 [_Object2World] 3
//   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:39 2016
//
//
// Parameters:
//
//   float _AtlasMaterialIndex;
//   sampler2D _FilteredFirstHexaTexture;
//   float4 _FilteredFirstHexaTexture_TexelSize;
//   row_major float4x4 _Object2World;
//   float4 _ProjectionParams;
//   sampler2D _RegionColorAndNeutralMap;
//   float4 _RegionColorAndNeutralMap_TexelSize;
//   float4 _ScreenParams;
//   float _Winter;
//   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
//   _AtlasMaterialIndex                 c9       1
//   _FilteredFirstHexaTexture_TexelSize c10      1
//   _WorldSize                          c11      1
//   _Winter                             c12      1
//   _RegionColorAndNeutralMap_TexelSize c13      1
//   _FilteredFirstHexaTexture           s0       1
//   _RegionColorAndNeutralMap           s1       1
//
//
// Default values:
//
//   _Winter
//     c12  = { 0, 0, 0, 0 };
//

    vs_3_0
    def c14, 0.00999999978, 0, 0.5, 0.00392156886
    def c15, 256, 1, -0.0500000007, 0
    dcl_position v0
    dcl_texcoord v1
    dcl_color v2
    dcl_2d s0
    dcl_2d s1
    dcl_position o0
    dcl_color o1
    dcl_texcoord o2
    dcl_texcoord1 o3
    dcl_texcoord2 o4
    dcl_texcoord3 o5

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

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

mov o0, r0 // Relocated from line 150 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\407C88DE.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, c14.z
    dp4 r0.y, c1, r2
    dp4 r0.z, c2, r2
    mul r1.y, r0.y, c7.x

//     mov o0, r0 // Relocated to line 146 with shadertool.py
mov o0.yz, r0 // Inserted by shadertool.py

    mov o4.zw, r0
    mul r1.w, r1.y, c14.z
    mad o4.xy, r1.z, c8.zwzw, r1.xwzw
    mov o1.yzw, v2
    mov o2.w, v1.x
    mov o5, c14.y

// approximately 48 instruction slots used (4 texture, 44 arithmetic)
