CGI/exercise2/glsl/sky.vert
2018-11-13 09:35:18 +01:00

19 lines
No EOL
524 B
GLSL

// This source code is property of the Computer Graphics and Visualization
// chair of the TU Dresden. Do not distribute!
// Copyright (C) CGV TU Dresden - All Rights Reserved
#version 330
uniform mat4 mvp;
out vec4 clipPos;
void main()
{
clipPos = vec4( float((gl_VertexID << 1) & 2) - 1.0,
float((gl_VertexID + 1) & 2) - 1.0,
float( gl_VertexID & 2) - 1.0,
1.0);
gl_Position = mvp * clipPos;
gl_Position.z = 0.5 * gl_Position.w;
}