CGI/exercise2/glsl/sky.vert

19 lines
524 B
GLSL
Raw Normal View History

2018-11-13 08:35:18 +00:00
// 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;
}