//portrait backgrounds
// CRC32: 694E45BB |    Unity headers extracted from Background.shader
//    Shader "Amplitude/Diplomacy/Background" {
//      Properties {
//       _MainTex ("Texture", 2D) = "black" { }
//       _Status ("Status : visibility, na, na, na", Vector) = (1,0,0,0)
//      }
//      Fallback Off
//      SubShader 1/1 {
//        Tags { "QUEUE"="Transparent-10" "RenderType"="Transparent" }
//        Pass 1/1 {
//          Tags { "QUEUE"="Transparent-10" "RenderType"="Transparent" }
//          ZTest False
//          ZWrite Off
//          Cull Off
//          Blend SrcAlpha OneMinusSrcAlpha
//          ColorMask RGB
//          GpuProgramID 14558
//          Program "vp" {
//            SubProgram "d3d9 " {
//              GpuProgramIndex 0
//            }
//          }
//        }
//      }
//    }
//
// Unity 5.3 headers extracted from Background.shader.decompressed:
//   API d3d9
//   Shader model vs_3_0
//   undeciphered1: 26 -1 -1
//   undeciphered3: 9 2 0 0 3 4 1
//   Vector 4 [_MainTex_TexelSize]
//   Matrix 0 [glstate_matrix_projection]
//
// 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:24:30 2016
//
//
// Parameters:
//
//   float4 _MainTex_TexelSize;
//   row_major float4x4 glstate_matrix_projection;
//
//
// Registers:
//
//   Name                      Reg   Size
//   ------------------------- ----- ----
//   glstate_matrix_projection c0       4
//   _MainTex_TexelSize        c4       1
//

    vs_3_0
    def c5, 1, 0, -0.5, 2.00999999
def c100, 0, 0, 0, 0
def c245, 0.51, 1.06, 0, 60
def c247, 0.35, 1.025, 0.0625, 6
dcl_2d s3
    dcl_position v0
    dcl_texcoord v1
    dcl_position o0
    dcl_texcoord o1.xy
    mov r0.xyz, c5
    dp4 r0.w, c1, r0.xxyy
    rcp r0.w, r0.w
    dp4 r0.x, c0, r0.xxyy
    mul r0.x, r0.w, r0.x
    add r1.yz, c5.z, v1.xyxw
    mul r1.w, r0.x, r1.y
    mul r1.xy, r1.zwzw, c5.w
    mov r1.z, -c0.x
    mov r1.w, v0.w
    dp4 r10.x, c0, r1
    dp4 r10.y, c1, r1
    dp4 r10.z, c2, r1
    dp4 r10.w, c3, r1
mov r15.x, c250.x
texldl r24, c247.z, s3
mov r25, r24

mov r14.x, c252.x
if_eq r14.x, c247.w
add r24.y, r10.w, -r24.y
mul r24.x, r24.x, r24.y
add r10.x, r10.x, -r24.x
mul r25.x, r25.x, -c247.x
add r10.x, r10.x, -r25.x
mul r10.x, r10.x, c247.y
endif


if_eq r14.x, c245.w
add r24.y, r10.w, -r24.y
mul r24.x, r24.x, r24.y
add r10.x, r10.x, -r24.x
mul r25.x, r25.x, -c245.x
add r10.x, r10.x, -r25.x
mul r10.x, r10.x, c245.y
endif

mov o0, r10
    rcp r0.y, c4.y
    mul r0.y, r0.y, c4.x
    rcp r0.y, r0.y
    mul r1.y, r0.y, r0.x
    sge r0.x, r1.y, c5.x
    rcp r1.z, r1.y
    mov r1.xw, c5.x
    lrp r2.xy, r0.x, r1.zwzw, r1
    lrp r0.xy, r2, v1, -c5.z
    mad o1.xy, c4, r0.z, r0

// approximately 24 instruction slots used
