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