summaryrefslogtreecommitdiff
path: root/advanced_lighting/3.1.shadow_mapping/shaders/debug_quad.fs
diff options
context:
space:
mode:
authorpryazha <pryadeiniv@mail.ru>2025-02-19 22:26:48 +0500
committerpryazha <pryadeiniv@mail.ru>2025-02-19 22:26:48 +0500
commitf9ad6fa902c1167d7622ee7af2617d14b62bee21 (patch)
tree9d78792cf360ed871616a9ea66c4237018292aa7 /advanced_lighting/3.1.shadow_mapping/shaders/debug_quad.fs
parent926cbd0d49890772f911e6a6bedb7835605ced89 (diff)
quite a lot of changes that I, of course, are not going to describe;)
Diffstat (limited to 'advanced_lighting/3.1.shadow_mapping/shaders/debug_quad.fs')
-rw-r--r--advanced_lighting/3.1.shadow_mapping/shaders/debug_quad.fs27
1 files changed, 0 insertions, 27 deletions
diff --git a/advanced_lighting/3.1.shadow_mapping/shaders/debug_quad.fs b/advanced_lighting/3.1.shadow_mapping/shaders/debug_quad.fs
deleted file mode 100644
index d250894..0000000
--- a/advanced_lighting/3.1.shadow_mapping/shaders/debug_quad.fs
+++ /dev/null
@@ -1,27 +0,0 @@
-#version 330 core
-
-in vec2 tex_coords;
-
-out vec4 frag_color;
-
-uniform sampler2D depth_map;
-uniform float near;
-uniform float far;
-
-float
-linearize_depth(float depth)
-{
- float z = (depth+1.0)*0.5;
- return((2.0*near*far)/(far+near-z*(far-near)));
-}
-
-void
-main(void)
-{
- float depth = texture(depth_map, tex_coords).r;
-
- /* frag_color = vec4(vec3(depth), 1.0); */
-
- /* NOTE(pryazha): For visual debugging of perspective projection light */
- frag_color = vec4(vec3(linearize_depth(depth)/far), 1.0);
-}