skyboxVertexShader.glsl 268 Bytes EditWeb IDE 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #version 330 in vec4 vertex; uniform mat4 mvp_matrix; out vec3 texcoord; void main(void) { // pass on the texture coordinates texcoord = vertex.xyz; texcoord.z = -texcoord.z; // transform the geometry to screen space gl_Position = mvp_matrix * vertex; }