feature/imgui-sdl
points-test
Last change
on this file since 8a6d19d 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:
619 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 vec3 vertexColor;
|
---|
6 |
|
---|
7 | // Output data ; will be interpolated for each fragment.
|
---|
8 | out vec3 fragmentColor;
|
---|
9 | // Values that stay constant for the whole mesh.
|
---|
10 | uniform mat4 MVP;
|
---|
11 |
|
---|
12 | void main(){
|
---|
13 |
|
---|
14 | // Output position of the vertex, in clip space : MVP * position
|
---|
15 | gl_Position = MVP * vec4(vertexPosition_modelspace,1);
|
---|
16 |
|
---|
17 | // The color of each vertex will be interpolated
|
---|
18 | // to produce the color of each fragment
|
---|
19 | fragmentColor = vertexColor;
|
---|
20 | }
|
---|
21 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.