2018-12-05 17:47:45 +01:00
|
|
|
#version 450
|
|
|
|
|
|
|
|
#include "compiled.inc"
|
|
|
|
|
|
|
|
uniform sampler2D texdepth;
|
2018-12-06 15:23:08 +01:00
|
|
|
uniform vec2 screenSizeInv;
|
2018-12-05 17:47:45 +01:00
|
|
|
|
|
|
|
in vec2 texCoord;
|
|
|
|
|
2018-12-06 15:23:08 +01:00
|
|
|
out float fragColor;
|
|
|
|
|
2018-12-05 17:47:45 +01:00
|
|
|
void main() {
|
2018-12-06 15:23:08 +01:00
|
|
|
float d0 = textureLod(texdepth, texCoord, 0.0).r;
|
|
|
|
float d1 = textureLod(texdepth, texCoord + vec2(1.0, 0.0) * screenSizeInv, 0.0).r;
|
|
|
|
float d2 = textureLod(texdepth, texCoord + vec2(0.0, 1.0) * screenSizeInv, 0.0).r;
|
|
|
|
float d3 = textureLod(texdepth, texCoord + vec2(1.0, 1.0) * screenSizeInv, 0.0).r;
|
|
|
|
fragColor = max(max(d0, d1), max(d2, d3));
|
2018-12-05 17:47:45 +01:00
|
|
|
}
|