summaryrefslogtreecommitdiff
path: root/depth/shaders/depth.fs
diff options
context:
space:
mode:
authorpryazha <pryadeiniv@mail.ru>2025-01-23 19:39:54 +0500
committerpryazha <pryadeiniv@mail.ru>2025-01-23 19:39:54 +0500
commitbf1c59565096ac9774493846cfb15e259d3b0e66 (patch)
tree82e8182af128580b6f38437feccba8c0f48abdc1 /depth/shaders/depth.fs
parent1ee094199af9c169e1ccaa53c7b0c186c4a3639e (diff)
restructure
Diffstat (limited to 'depth/shaders/depth.fs')
-rw-r--r--depth/shaders/depth.fs27
1 files changed, 0 insertions, 27 deletions
diff --git a/depth/shaders/depth.fs b/depth/shaders/depth.fs
deleted file mode 100644
index 2f3d9ca..0000000
--- a/depth/shaders/depth.fs
+++ /dev/null
@@ -1,27 +0,0 @@
-#version 330 core
-
-out vec4 frag_color;
-
-in vec2 tex_coords;
-
-uniform sampler2D our_texture;
-
-float near = 0.1f;
-float far = 100.0f;
-
-float
-linearize_depth(float depth)
-{
- float ndc_z = 2.0f*depth-1.0f;
- return((2.0f*near*far)/(far+near-ndc_z*(far-near)));
-}
-
-void
-main(void)
-{
- /*
- frag_color = texture(our_texture, tex_coords);
- */
- float depth = linearize_depth(gl_FragCoord.z)/far;
- frag_color = vec4(vec3(depth), 1.0f);
-}