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

attribute vec4 vertexPosition;
attribute vec3 vertexNormal;

varying vec4 color0;
varying vec3 position0;
varying 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;
}