From 7ec62c58e9560fc961ec3522490e40ad1d259c72 Mon Sep 17 00:00:00 2001 From: omnisci3nce Date: Thu, 18 Jul 2024 16:17:23 +1000 Subject: wip skybox. make geometry owned and copied onto Mesh --- assets/shaders/skybox.vert | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'assets/shaders/skybox.vert') diff --git a/assets/shaders/skybox.vert b/assets/shaders/skybox.vert index e9149d8..57c6399 100644 --- a/assets/shaders/skybox.vert +++ b/assets/shaders/skybox.vert @@ -1,11 +1,18 @@ #version 410 core -layout(location = 0) in vec3 inPos; +layout(location = 0) in vec3 inPosition; +layout(location = 1) in vec3 inNormal; +layout(location = 2) in vec2 inTexCoords; -uniform In { - vec3 textureDir; -} inc; +uniform Camera { + mat4 view; + mat4 proj; + vec4 viewPos; +} cam; + +out vec3 TexCoords; void main() { - -} \ No newline at end of file + TexCoords = inPosition; + gl_Position = cam.proj * cam.view * vec4(inPosition, 1.0); +} -- cgit v1.2.3-70-g09d2