3 #extension GL_ARB_fragment_coord_conventions: require
4 #extension GL_ARB_explicit_attrib_location : enable
7 #if !defined GL_ARB_fragment_coord_conventions
8 # error GL_ARB_fragment_coord_conventions is not defined
9 #elif GL_ARB_fragment_coord_conventions != 1
10 # error GL_ARB_fragment_coord_conventions is not equal to 1
14 layout (location = 0) in vec4 pos;
17 uniform float gtf_windowWidth;
18 uniform float gtf_windowHeight;
25 i = vec4((pos.x+1.0)*0.5*gtf_windowWidth, (pos.y+1.0)*0.5*gtf_windowHeight, (f-n)*0.5*pos.z + (f+n)*0.5, pos.w);