summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/deferred-renderer-cpp/geometry_gl3.vert
blob: d3e302d16fc52e61a0b4005f7a3bfbded99c2b29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#version 140

in vec4 vertexPosition;
in vec3 vertexNormal;

out vec4 color0;
out vec3 position0;
out vec3 normal0;

uniform mat4 mvp;
uniform mat4 modelView;
uniform mat3 modelViewNormal;
uniform vec4 meshColor;

void main()
{
    color0 = meshColor;
    position0 = vec3(modelView * vertexPosition);
    normal0 = normalize(modelViewNormal * vertexNormal);
    gl_Position = mvp * vertexPosition;
}