From bd49bd525f4c6c6c15c4142bf42d1dd38be6fc16 Mon Sep 17 00:00:00 2001 From: pryazha Date: Sun, 19 Jan 2025 17:33:44 +0500 Subject: initial commit --- uniform_buffer/shaders/skybox.vs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 uniform_buffer/shaders/skybox.vs (limited to 'uniform_buffer/shaders/skybox.vs') diff --git a/uniform_buffer/shaders/skybox.vs b/uniform_buffer/shaders/skybox.vs new file mode 100644 index 0000000..36a07ed --- /dev/null +++ b/uniform_buffer/shaders/skybox.vs @@ -0,0 +1,19 @@ +#version 330 core + +layout(location = 0) in vec3 apos; + +out vec3 tex_coords; + +layout(std140) uniform Matrices +{ + uniform mat4 projection; + uniform mat4 view; +}; + +void +main(void) +{ + tex_coords = apos; + vec4 pos = projection*view*vec4(apos, 1.0f); + gl_Position = pos.xyww; +} -- cgit v1.2.3