summaryrefslogtreecommitdiff
path: root/src/extras/shaders/es2/skybox.vert
blob: 3a9fb1beb7b086a8168c408e6d0cbe65e5bcb6cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
attribute vec3 vertexPosition;
varying vec3 texCoord0;

uniform mat4 modelMatrix;
uniform mat4 viewMatrix;
uniform mat4 projectionMatrix;

void main()
{
    texCoord0 = vertexPosition.xyz;
    // Converting the viewMatrix to a mat3, then back to a mat4
    // removes the translation component from it
    gl_Position = vec4(projectionMatrix * mat4(mat3(viewMatrix)) * modelMatrix * vec4(vertexPosition, 1.0)).xyww;
}