[vert.glsl]

#version 130

in vec4 in_Position;
in vec4 in_Color;
out vec4 pass_color;

uniform mat4 u_projection;
uniform mat4 u_view;

void main()
{
    if (in_Position.w > 0.5)
        gl_Position = vec4(in_Position.xyz, 1.0);
    else
        gl_Position = u_projection * u_view
                      * vec4(in_Position.xyz, 1.0);
    pass_color = in_Color;
}

[frag.glsl]

#version 130

#if defined GL_ES
precision mediump float;
#endif

in vec4 pass_color;
out vec4 out_color;

void main()
{
    out_color = pass_color;
}

