source: network-game/graphics_library/TransformVertexShader.vertexshader@ ace001a

Last change on this file since ace001a was af116c0, checked in by Dmitry Portnoy <dmp1488@…>, 11 years ago

new graphics library code

  • Property mode set to 100644
File size: 553 bytes
Line 
1#version 330 core
2
3// Input vertex data, different for all executions of this shader.
4layout(location = 0) in vec3 vertexPosition_modelspace;
5layout(location = 1) in vec2 vertexUV;
6
7// Output data ; will be interpolated for each fragment.
8out vec2 UV;
9
10// Values that stay constant for the whole mesh.
11uniform mat4 MVP;
12
13void main(){
14
15 // Output position of the vertex, in clip space : MVP * position
16 gl_Position = MVP * vec4(vertexPosition_modelspace,1);
17
18 // UV of the vertex. No special space for this one.
19 UV = vertexUV;
20}
21
Note: See TracBrowser for help on using the repository browser.