diff options
author | jjesswan <jessica_wan@brown.edu> | 2024-05-07 06:02:29 -0400 |
---|---|---|
committer | jjesswan <jessica_wan@brown.edu> | 2024-05-07 06:02:29 -0400 |
commit | 6a45579dbbf991c0e12ce59958e3b533d19fc9d4 (patch) | |
tree | 83ad11d63c0a1d1c89b9469455ecbda4531fe6ac /resources/shaders/skybox.vert | |
parent | cb868acadcae4e3f497ecdabeca507f3e73e01c7 (diff) |
rotating skyboxgit add -A
Diffstat (limited to 'resources/shaders/skybox.vert')
-rw-r--r-- | resources/shaders/skybox.vert | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/resources/shaders/skybox.vert b/resources/shaders/skybox.vert new file mode 100644 index 0000000..edf50e4 --- /dev/null +++ b/resources/shaders/skybox.vert @@ -0,0 +1,21 @@ +#version 330 core + +layout(location = 0) in vec3 pos; // Position of the vertex +//layout(location = 1) in vec3 normal; // Normal of the vertex +//layout(location = 3) in vec3 texCoords; + +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); +} |