//-----------------------------------------------------------------------------
//GLSL
//-----------------------------------------------------------------------------
[vert.glsl]

#version 120

attribute vec2 in_Position;

uniform vec2 in_screen_res;

varying vec2 pass_position;

void main()
{
    pass_position = ((vec2(1.0) + in_Position) * 0.5 * in_screen_res);
    gl_Position = vec4(in_Position, 0.0, 1.0);
}

[frag.glsl]

#version 120

#if defined GL_ES
precision highp float;
#endif

uniform sampler2D in_texture;
uniform vec3 in_source_point;
uniform vec2 in_screen_res;

varying vec2 pass_position;

void main(void)
{
    if (floor(in_source_point.xy) == floor(pass_position))
        gl_FragColor = vec4(in_source_point.xy / in_screen_res, in_source_point.z, 1.0);
    else
    {
        vec4 src_color = texture2D(in_texture, pass_position / in_screen_res);
        gl_FragColor = src_color;//vec4(0.0, 0.0, 0.0, 1.0);
    }
        //vec4(pass_position / in_screen_res, 0.0, 1.0);
}

//-----------------------------------------------------------------------------
//HLSL
//-----------------------------------------------------------------------------
[vert.hlsl]

void main(float2 in_Position : POSITION,
          out float2 pass_Position : TEXCOORD0,
          out float4 out_Position : POSITION)
{
    pass_Position = in_Position;
    out_Position = float4(in_Position, 0.0, 1.0);
}

[frag.hlsl]

void main(in float2 pass_Position : TEXCOORD0,
          uniform float in_Flag,
          uniform float3 in_Point,
          uniform float3 in_Color,
          out float4 out_FragColor : COLOR)
{
    out_FragColor = float4(0.0);
}

