source: framspy/gui/visual/shaders/WorldVertexShader.glsl @ 1198

Last change on this file since 1198 was 1198, checked in by Maciej Komosinski, 15 months ago

Added simple Python GUI for Framsticks library/server

File size: 731 bytes
Line 
1#version 330
2
3layout(location = 0) in vec3 position;
4layout(location = 1) in vec3 color;
5
6out vec3 v_color;
7
8uniform mat4 projectionMatrix;
9uniform mat4 viewMatrix;
10uniform int mode;
11uniform float worldSize;
12uniform float waterLevel;
13
14void 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.