blob: cac49893a5bc45e93954006028d922718ca328c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#version 330
in vec3 vertexPosition;
out 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;
}
|