25 lines
516 B
Plaintext
Executable File
25 lines
516 B
Plaintext
Executable File
attribute vec3 vPosition;
|
|
attribute vec3 vNormal;
|
|
attribute vec2 vTexCoord;
|
|
varying vec3 position;
|
|
varying vec3 normal;
|
|
varying vec2 texCoord;
|
|
|
|
|
|
uniform mat4 ProjectionMatrix1;
|
|
uniform mat4 ModelViewMatrix;
|
|
|
|
void main()
|
|
{
|
|
|
|
mat4 mvp = ProjectionMatrix1 * ModelViewMatrix;
|
|
|
|
vec4 tnorm = ModelViewMatrix * vec4(vNormal,0.0);
|
|
normal = normalize(vec3(tnorm));
|
|
|
|
position = vec3( ModelViewMatrix * vec4(vPosition,1.0) );
|
|
gl_Position = mvp * vec4(vPosition,1.0);
|
|
|
|
|
|
texCoord = vTexCoord;
|
|
} |