feature/imgui-sdl
points-test
Last change
on this file since 972aca1 was 8a6d19d, checked in by Dmitry Portnoy <dmitry.portnoy@…>, 8 years ago |
Implement movement in a basic 3D scene and add some examples from the new OpenGL tutorials site
|
-
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.