Full screen quad texture coordinates mapping I'm rendering a full screen quad using gl_VertexID as GL_TRIANGLE_STRIP

const vec2 kVertices[4] = vec2[]
(
 vec2(-1.0,  1.0),
 vec2(-1.0, -1.0),
 vec2( 1.0,  1.0),
 vec2( 1.0, -1.0)
 );

void main() {
    gl_Position = vec4(kVertices[gl_VertexID], 1.0, 1.0);
    vs_out.texCoords = gl_Position.xy / 2.0 + 0.5;
    vs_out.instanceID = gl_InstanceID;
}


Geometry shader just passes coordinates through into the output called vTexCoords.

Then, in fragment shader, I output red and green into 2x2 texture using following code:

if (vTexCoords.x &gt;= 0.95) {
    oFragData0 = vec4(0.0, 1.0, 0.0, 1.0);
} else {
    oFragData0 = vec4(1.0, 0.0, 0.0, 1.0);
}


I always assumed texture coordinates (0; 0), (0; 1), (1; 0), (1; 1) would map to the vertices, but the output is completely red, which means X value never reaches 1.0. 
Then I'm trying to use 0.75 (vTexCoords.x &gt;= 0.75), which is a texel center, and half of the texture becomes green, as expected.

What am I misunderstanding here?
I may have misunderstood, but it sounds like the frame buffer you're rendering to is only 2×2 pixels? In that case, the fragment shader will be evaluated at each pixel center, which will be at 0.25 and 0.75 in UV space. So with a threshold of 0.95 you will indeed not get any pixels green.

If you use a larger framebuffer, say 100×100, then the last 5 pixels of each row should come out green.