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

varying vec3 position;
varying vec3 normal;
varying vec3 color;

uniform mat4 modelView;
uniform mat3 modelViewNormal;
uniform mat4 mvp;

void main()
{
    normal = normalize( modelViewNormal * vertexNormal );
    position = vec3( modelView * vec4( vertexPosition, 1.0 ) );
    color = vertexColor;

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