aboutsummaryrefslogtreecommitdiff
path: root/data/shaders/bump-poly.vert
blob: 0207c37b595fd4bfcea5f7aa11b6492b00b138e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
attribute vec3 position;
attribute vec3 normal;

uniform mat4 ModelViewProjectionMatrix;
uniform mat4 NormalMatrix;

varying vec3 Normal;

void main(void)
{
    // Transform the normal to eye coordinates
    Normal = normalize(vec3(NormalMatrix * vec4(normal, 1.0)));

    // Transform the position to clip coordinates
    gl_Position = ModelViewProjectionMatrix * vec4(position, 1.0);
}