diff options
Diffstat (limited to 'skybox/shaders')
-rw-r--r-- | skybox/shaders/cube.fs | 13 | ||||
-rw-r--r-- | skybox/shaders/cube.vs | 17 | ||||
-rw-r--r-- | skybox/shaders/reflection.fs | 17 | ||||
-rw-r--r-- | skybox/shaders/reflection.vs | 19 | ||||
-rw-r--r-- | skybox/shaders/refraction.fs | 18 | ||||
-rw-r--r-- | skybox/shaders/refraction.vs | 19 | ||||
-rw-r--r-- | skybox/shaders/skybox.fs | 13 | ||||
-rw-r--r-- | skybox/shaders/skybox.vs | 16 |
8 files changed, 0 insertions, 132 deletions
diff --git a/skybox/shaders/cube.fs b/skybox/shaders/cube.fs deleted file mode 100644 index f58c5d3..0000000 --- a/skybox/shaders/cube.fs +++ /dev/null @@ -1,13 +0,0 @@ -#version 330 core - -out vec4 frag_color; - -in vec2 tex_coords; - -uniform sampler2D texture1; - -void -main(void) -{ - frag_color = texture(texture1, tex_coords); -} diff --git a/skybox/shaders/cube.vs b/skybox/shaders/cube.vs deleted file mode 100644 index 3c11932..0000000 --- a/skybox/shaders/cube.vs +++ /dev/null @@ -1,17 +0,0 @@ -#version 330 core - -layout(location = 0) in vec3 apos; -layout(location = 1) in vec2 atex_coords; - -uniform mat4 model; -uniform mat4 view; -uniform mat4 projection; - -out vec2 tex_coords; - -void -main(void) -{ - gl_Position = projection*view*model*vec4(apos, 1.0f); - tex_coords = atex_coords; -} diff --git a/skybox/shaders/reflection.fs b/skybox/shaders/reflection.fs deleted file mode 100644 index 3723ea9..0000000 --- a/skybox/shaders/reflection.fs +++ /dev/null @@ -1,17 +0,0 @@ -#version 330 core - -in vec3 pos; -in vec3 normal; - -out vec4 frag_color; - -uniform vec3 camera_pos; -uniform samplerCube skybox; - -void -main(void) -{ - vec3 i = pos-camera_pos; - vec3 r = reflect(i, normalize(normal)); - frag_color = texture(skybox, r); -} diff --git a/skybox/shaders/reflection.vs b/skybox/shaders/reflection.vs deleted file mode 100644 index 34ad142..0000000 --- a/skybox/shaders/reflection.vs +++ /dev/null @@ -1,19 +0,0 @@ -#version 330 core - -layout(location = 0) in vec3 apos; -layout(location = 1) in vec3 anormal; - -out vec3 pos; -out vec3 normal; - -uniform mat4 model; -uniform mat4 view; -uniform mat4 projection; - -void -main(void) -{ - pos = vec3(model*vec4(apos, 1.0f)); - normal = mat3(transpose(inverse(model)))*anormal; - gl_Position = projection*view*model*vec4(apos, 1.0f); -} diff --git a/skybox/shaders/refraction.fs b/skybox/shaders/refraction.fs deleted file mode 100644 index 8a8a8c5..0000000 --- a/skybox/shaders/refraction.fs +++ /dev/null @@ -1,18 +0,0 @@ -#version 330 core - -in vec3 pos; -in vec3 normal; - -out vec4 frag_color; - -uniform vec3 camera_pos; -uniform samplerCube skybox; - -void -main(void) -{ - float ratio = 1.0f/1.52f; - vec3 i = pos-camera_pos; - vec3 r = refract(i, normalize(normal), ratio); - frag_color = texture(skybox, r); -} diff --git a/skybox/shaders/refraction.vs b/skybox/shaders/refraction.vs deleted file mode 100644 index 34ad142..0000000 --- a/skybox/shaders/refraction.vs +++ /dev/null @@ -1,19 +0,0 @@ -#version 330 core - -layout(location = 0) in vec3 apos; -layout(location = 1) in vec3 anormal; - -out vec3 pos; -out vec3 normal; - -uniform mat4 model; -uniform mat4 view; -uniform mat4 projection; - -void -main(void) -{ - pos = vec3(model*vec4(apos, 1.0f)); - normal = mat3(transpose(inverse(model)))*anormal; - gl_Position = projection*view*model*vec4(apos, 1.0f); -} diff --git a/skybox/shaders/skybox.fs b/skybox/shaders/skybox.fs deleted file mode 100644 index bf69c8b..0000000 --- a/skybox/shaders/skybox.fs +++ /dev/null @@ -1,13 +0,0 @@ -#version 330 core - -in vec3 tex_coords; - -out vec4 frag_color; - -uniform samplerCube skybox; - -void -main(void) -{ - frag_color = texture(skybox, tex_coords); -} diff --git a/skybox/shaders/skybox.vs b/skybox/shaders/skybox.vs deleted file mode 100644 index 4259dc1..0000000 --- a/skybox/shaders/skybox.vs +++ /dev/null @@ -1,16 +0,0 @@ -#version 330 core - -layout(location = 0) in vec3 apos; - -out vec3 tex_coords; - -uniform mat4 view; -uniform mat4 projection; - -void -main(void) -{ - tex_coords = apos; - vec4 pos = projection*view*vec4(apos, 1.0f); - gl_Position = pos.xyww; -} |