summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/transparency-qml/phongalpha.vert
blob: 03a4162132248e6259808bd3b1793f788fffa7f2 (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 position;
varying vec3 normal;

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

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

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