summaryrefslogtreecommitdiff
path: root/engine-ocean/Resources/Shaders/skybox.vert
blob: ddffb10fde4b37a8acc512025bcbf62fa41cd2e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#version 330 core

layout (location = 0) in vec3 pos;
//layout (location = 1) in vec2 uv;

uniform mat4 view, projection, rotation;

out vec3 tex_coord;



void main() {

    tex_coord = vec3(pos.x, pos.y, -pos.z);
    vec4 world_pos = projection*view*rotation*vec4(pos, 1.0);
    gl_Position = vec4(world_pos.x, world_pos.y, world_pos.w, world_pos.w);

//    tex_coord = pos;
//    gl_Position = projection*view*vec4(pos, 1.0);
}