armory/Shaders/downsample_depth/downsample_depth.frag.glsl
2018-12-05 17:47:45 +01:00

14 lines
209 B
GLSL

#version 450
#include "compiled.inc"
uniform sampler2D texdepth;
in vec2 texCoord;
void main() {
float d = textureLod(texdepth, texCoord, 0.0).r;
// Select max depth from 2x2 area..
gl_FragDepth = d;
}