From dad534b3c4031ceab3f6f13b1efd512a6cef0131 Mon Sep 17 00:00:00 2001
From: Joursoir <chat@joursoir.net>
Date: Wed, 14 Apr 2021 11:29:37 +0000
Subject: add shaders for skybox

---
 skybox.frag | 11 +++++++++++
 skybox.vs   | 13 +++++++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 skybox.frag
 create mode 100644 skybox.vs

diff --git a/skybox.frag b/skybox.frag
new file mode 100644
index 0000000..273fa9c
--- /dev/null
+++ b/skybox.frag
@@ -0,0 +1,11 @@
+#version 330 core
+
+in vec3 tex_coords;
+out vec4 color;
+
+uniform samplerCube skybox;
+
+void main()
+{
+	color = texture(skybox, tex_coords);
+}
diff --git a/skybox.vs b/skybox.vs
new file mode 100644
index 0000000..56a8339
--- /dev/null
+++ b/skybox.vs
@@ -0,0 +1,13 @@
+#version 330 core
+layout (location = 0) in vec3 position;
+layout (location = 1) in vec2 skip;
+
+out vec3 tex_coords;
+
+uniform mat4 proj_view;
+
+void main()
+{
+	tex_coords = position;
+	gl_Position = proj_view * vec4(position, 1.0);
+}
-- 
cgit v1.2.3-18-g5258