Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uniform mat4 mvpMatrix;
- uniform mat4 rotationMatrix;
- attribute vec3 position;
- attribute vec3 normal;
- attribute vec4 color;
- varying vec4 colorVarying;
- varying float lightIntensity;
- void main()
- {
- gl_Position = mvpMatrix * vec4(position, 1.0);
- vec4 rotatedNormal = rotationMatrix * vec4(normal, 1.0);
- lightIntensity = dot(rotatedNormal.xyz, normalize(vec3(0.2, 0.9, -1.0)));
- colorVarying = color;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement