//
// Generated by Microsoft (R) D3DX9 Shader Compiler 9.08.299.0000
//
//   vsa shaderdump19/NIGHTEYE000.pso /Fcshaderdump19/NIGHTEYE000.pso.dis
//
//
// Parameters:

float4 SpellInput : register(c1);
sampler2D ScreenSpace : register(s0);


// Registers:
//
//   Name         Reg   Size
//   ------------ ----- ----
//   SpellInput   const_1       1
//   ScreenSpace  texture_0       1
//


// Structures:

struct VS_OUTPUT {
    float4 ScreenOffset : TEXCOORD0;
};

struct PS_OUTPUT {
    float4 Color : COLOR0;
};

// Code:

PS_OUTPUT main(VS_OUTPUT IN) {
    PS_OUTPUT OUT;

    const int4 const_0 = {1, 0, 0, -1};
    const float4 const_2 = {1, 1, 1, 0.5};
    const float4 const_3 = {0.5, 0.5, 0.5, 0};

    float q1;
    float4 r0;
    float4 r1;

    IN.ScreenOffset.xyzw = tex2D(ScreenSpace, IN.ScreenOffset.xy);
    r1.xyzw = dot(const_0.xyz, SpellInput.xyz);
    r0.w = 1;
    q1 = 0.5 - (((r1.w - 1) * (r1.w - 1)) * 0.5);
    r0.xyz = lerp(IN.ScreenOffset.xyz, dot(const_2.xyz, IN.ScreenOffset.xyz) * const_3.xyz, q1 > 0.5 ? 0 : 1);
    OUT.Color.xyzw = r0.xyzw;

    return OUT;
};

// approximately 7 instruction slots used (1 texture, 6 arithmetic)
