Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/eevee_hiz_copy_frag.glsl')
-rw-r--r--source/blender/draw/engines/eevee/shaders/eevee_hiz_copy_frag.glsl17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/eevee_hiz_copy_frag.glsl b/source/blender/draw/engines/eevee/shaders/eevee_hiz_copy_frag.glsl
new file mode 100644
index 00000000000..f0ee9f515c9
--- /dev/null
+++ b/source/blender/draw/engines/eevee/shaders/eevee_hiz_copy_frag.glsl
@@ -0,0 +1,17 @@
+/**
+ * Copy input depth texture to lower left corner of the destination, filling any padding with
+ * clamped texture extrapolation.
+ */
+
+#pragma BLENDER_REQUIRE(common_view_lib.glsl)
+
+uniform sampler2D depth_tx;
+
+layout(location = 0) out float out_depth;
+
+void main()
+{
+ vec2 uv = gl_FragCoord.xy / vec2(textureSize(depth_tx, 0).xy);
+
+ out_depth = texture(depth_tx, uv).r;
+}