Last change
on this file since 48801af 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.
|
---|
4 | layout(location = 0) in vec3 vertexPosition_modelspace;
|
---|
5 | layout(location = 1) in vec2 vertexUV;
|
---|
6 |
|
---|
7 | // Output data ; will be interpolated for each fragment.
|
---|
8 | out vec2 UV;
|
---|
9 |
|
---|
10 | // Values that stay constant for the whole mesh.
|
---|
11 | uniform mat4 MVP;
|
---|
12 |
|
---|
13 | void 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.