blob: d223a7650c5a1c9a133d83b5aaff4e6a7acdd208 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
uniform sampler2D depthBuffer;
void main(void)
{
float depth = texelFetch(depthBuffer, ivec2(gl_FragCoord.xy), 0).r;
/* background, discard */
if (depth >= 1.0) {
discard;
}
gl_FragDepth = depth;
}
|