Last change
on this file since 1288 was
1198,
checked in by Maciej Komosinski, 22 months ago
|
Added simple Python GUI for Framsticks library/server
|
File size:
731 bytes
|
Line | |
---|
1 | #version 330
|
---|
2 |
|
---|
3 | layout(location = 0) in vec3 position;
|
---|
4 | layout(location = 1) in vec3 color;
|
---|
5 |
|
---|
6 | out vec3 v_color;
|
---|
7 |
|
---|
8 | uniform mat4 projectionMatrix;
|
---|
9 | uniform mat4 viewMatrix;
|
---|
10 | uniform int mode;
|
---|
11 | uniform float worldSize;
|
---|
12 | uniform float waterLevel;
|
---|
13 |
|
---|
14 | void main(void) {
|
---|
15 | gl_Position = vec4(position, 1.0);
|
---|
16 | v_color = color;
|
---|
17 |
|
---|
18 | /*if(mode == 0)
|
---|
19 | {
|
---|
20 | gl_Position = projectionMatrix * viewMatrix * vec4(position, 1.0);
|
---|
21 | height = position.y;
|
---|
22 | }
|
---|
23 | else
|
---|
24 | {
|
---|
25 | mat4 transformation = mat4(1);
|
---|
26 | transformation[0][0] = worldSize;
|
---|
27 | transformation[2][2] = worldSize;
|
---|
28 | transformation[3][1] = waterLevel;
|
---|
29 | gl_Position = projectionMatrix * viewMatrix * transformation * vec4(position, 1.0);
|
---|
30 | height = 0;
|
---|
31 | }
|
---|
32 | v_color = color;*/
|
---|
33 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.