[vert.glsl]

#version 130

attribute vec3 in_Position;
attribute vec2 in_TexCoord;
varying vec2 pass_TexCoord;

uniform mat4 proj_matrix;
uniform mat4 view_matrix;
uniform mat4 model_matrix;

void main()
{
    gl_Position = proj_matrix * view_matrix * model_matrix
                * vec4(in_Position, 1.0);
    pass_TexCoord = in_TexCoord;
}

[frag.glsl]

#version 130

#if defined GL_ES
precision mediump float;
#endif

uniform sampler2D in_Texture;
uniform vec2 in_TexSize;
varying vec2 pass_TexCoord;

void main()
{
    vec4 col = texture2D(in_Texture, pass_TexCoord);
    gl_FragColor = col;
}

[vert.hlsl]

void main(float4 in_Position : POSITION,
          float2 in_TexCoord : TEXCOORD0,
          uniform float4x4 proj_matrix,
          uniform float4x4 view_matrix,
          uniform float4x4 model_matrix,
          uniform float2 in_TexSize,
          out float2 out_TexCoord : TEXCOORD0,
          out float4 out_Position : POSITION)
{
#if _XBOX
    float2 delta = float2(-0.5, -0.5) / in_TexSize;
#else
    float2 delta = float2(0.0, 0.0);
#endif
    out_Position = mul(proj_matrix, mul(view_matrix, mul(model_matrix, in_Position)));
    out_TexCoord = in_TexCoord + delta;
}

[frag.hlsl]

void main(float2 in_TexCoord : TEXCOORD0,
          uniform sampler2D in_Texture,
          out float4 out_FragColor : COLOR)
{
    float4 col = tex2D(in_Texture, in_TexCoord);
    out_FragColor = col;
}

