Debian Codegraph @

src/extras/shaders/es2/gooch.vert

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