summaryrefslogtreecommitdiff
path: root/drivers/gles2/shaders/copy.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles2/shaders/copy.glsl')
-rw-r--r--drivers/gles2/shaders/copy.glsl10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gles2/shaders/copy.glsl b/drivers/gles2/shaders/copy.glsl
index ae7185a1d6..cb42970921 100644
--- a/drivers/gles2/shaders/copy.glsl
+++ b/drivers/gles2/shaders/copy.glsl
@@ -71,6 +71,11 @@ uniform sampler2D source;
#endif
varying vec2 uv2_interp;
+
+#ifdef USE_DEPTH
+uniform highp sampler2D source_depth; //texunit:1
+#endif
+
#ifdef USE_GLOW
uniform sampler2D glow_source;
@@ -547,5 +552,10 @@ void main() {
gl_FragColor = color;
+
+#ifdef USE_DEPTH
+ gl_FragDepth = texture(source_depth,uv_interp).r;
+#endif
+
}