summaryrefslogtreecommitdiffstats
path: root/src/render/shaders/es2/gooch.vert
blob: dd162a66be95cf26669f7893dfff69c294fab95b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
attribute vec3 vertexPosition;
attribute vec3 vertexNormal;

varying vec3 worldPosition;
varying vec3 worldNormal;

uniform mat4 modelMatrix;
uniform mat3 modelNormalMatrix;
uniform mat4 mvp;

void main()
{
    worldNormal = normalize( modelNormalMatrix * vertexNormal );
    worldPosition = vec3( modelMatrix * vec4( vertexPosition, 1.0 ) );

    gl_Position = mvp * vec4( vertexPosition, 1.0 );
}