Debian Codegraph @

src/extras/shaders/es2/pervertexcolor.vert

raw
1 attribute vec3 vertexPosition;
2 attribute vec3 vertexNormal;
3 attribute vec4 vertexColor;
4
5 varying vec3 worldPosition;
6 varying vec3 worldNormal;
7 varying vec4 color;
8
9 uniform mat4 modelMatrix;
10 uniform mat3 modelNormalMatrix;
11 uniform mat4 mvp;
12
13 void main()
14 {
15 worldNormal = normalize( modelNormalMatrix * vertexNormal );
16 worldPosition = vec3( modelMatrix * vec4( vertexPosition, 1.0 ) );
17 color = vertexColor;
18
19 gl_Position = mvp * vec4( vertexPosition, 1.0 );
20 }