diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-11-29 19:55:12 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-11-29 19:55:12 -0300 |
commit | a47c78aed113a9b4c009c5a2ef29c690192c7eef (patch) | |
tree | 93bed03fdf277a59a6cb10cc2ca9ef6a0f17ace6 /drivers/gles2 | |
parent | 3f40701002254aeb20e20acbad0cd28a9b7476e3 (diff) |
Screen space reflection effect
Diffstat (limited to 'drivers/gles2')
-rw-r--r-- | drivers/gles2/shaders/copy.glsl | 10 |
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 + } |