#version 150 in vec3 position; uniform float height; uniform float aspect = 4.0/3.0; uniform float zNear; uniform float zFar; mat4 camera = mat4( vec4(1.0/(height*aspect), 0.0, 0.0, 0.0), vec4( 0.0, 1.0/height, 0.0, 0.0), vec4( 0.0, 0.0, 2.0/(zFar - zNear), 0.0), vec4( 0.0, 0.0, -zNear - 1, 1.0) ); void main () { gl_Position = camera * vec4(position, 1.0); }